Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure column keys in virgin tables are unique on 32bit devices #4051

Merged
merged 2 commits into from
Nov 9, 2020

Conversation

jedelbo
Copy link
Contributor

@jedelbo jedelbo commented Nov 9, 2020

If column keys are not unique we end up finding the wrong backlink column during upgrade.

Fixes realm/realm-java#6992

@jedelbo jedelbo changed the title Je/unique column keys Ensure column keys in virgin tables are unique on 32bit devices Nov 9, 2020
@jedelbo jedelbo changed the base branch from master to v6 November 9, 2020 13:06
@jedelbo jedelbo requested a review from finnschiermer November 9, 2020 13:07
@cmelchior
Copy link
Contributor

Does this fix already upgraded files?

@jedelbo
Copy link
Contributor Author

jedelbo commented Nov 9, 2020

Does this fix already upgraded files?

No :-(. The files that has been upgraded and end up being inconsistent cannot be rescued.

@jedelbo jedelbo merged commit 2bf344f into v6 Nov 9, 2020
@jedelbo jedelbo deleted the je/unique-column-keys branch November 9, 2020 13:55
@jedelbo
Copy link
Contributor Author

jedelbo commented Nov 9, 2020

Or probably more correct: The files can be fixed - but not automatically. It would impose a very big runtime overhead to run a complete consistency check on every realm open.

@bmunkholm
Copy link
Contributor

Could we make an option to run a consistency check? Would that be a bad idea? I'm not too fond of bloating the API with those "debugging" features... How many have experienced this though?

@@ -5,7 +5,7 @@

### Fixed
* <How to hit and notice issue? what was the impact?> ([#????](https://github.com/realm/realm-core/issues/????), since v?.?.?)
* None.
* Files upgraded on 32-bit devices could end up being inconsistent resulting in "Key not found" exception to be thown. ([#6992](https://github.com/realm/realm-java/issues/6992), since v6.0.16)
Copy link
Contributor

@bmunkholm bmunkholm Nov 9, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jedelbo Can you add when that could happen?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants