-
Notifications
You must be signed in to change notification settings - Fork 172
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
Fix backlink check in migration. #4414
Conversation
Hey @DominicFrei, thanks for the contribution! There are just a couple of things we need to fix: please update |
@fealebenpae Thanks for clearing that up! I've put it into draft mode since there seems to be one thing to clarify first. @tgoyne suggested a couple of tests that I implemented. According to the CI, one (already existing) test is failing though: |
According to the original post in the forum that brought this problem up it seems like that specific user did actually have Maybe the user was mislead by the error message in https://github.com/realm/realm-core/blob/master/src/realm/object-store/object_store.cpp#L570 though: To address this issue a bit better and also incorporate the suggestions made by @jedelbo and @ironage I reworked the
Notes:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I am "the user" from the forums. Just to clarify, my objects that I wanted to embed did not have multiple parents even though the crash said that they did, so the error message was misleading. But... one thing I am scared about is orphaned objects. I would not be able to use this in production without a way to ensure that I have deleted all possible orphaned objects. Crashes in the migration function are about as bad as it can get from a user perspective. |
@sipersso The changes made in https://github.com/realm/realm-core/pull/4414/files#diff-e752b38a6d72eb50c7ab147fe48749dee382b2c4153c01364db035c2843f1519R1054 lead to several different errors that will be thrown depending on the problem that happened. The error message should be accurate now. |
Necessary core changes to enable realm/realm-swift#7094 (realm/realm-swift#7060):