-
Notifications
You must be signed in to change notification settings - Fork 165
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
Non-symmetric results with conflicting default null value #7536
Comments
➤ On 2024-03-15, danieltabacaru commented: Do you mean |
➤ On 2024-03-18, Sean Brandenburg commented: Hey [~daniel.tabacaru@mongodb.com], sorry I should have left a note about this. The .txt files attached to this ticket are the input files for |
➤ On 2024-03-18, danieltabacaru commented: I see. So those two messages are enough to reproduce it? |
➤ On 2024-03-18, danieltabacaru commented: great. thanks a lot! |
➤ On 2024-03-22, danieltabacaru commented: I tried applying the files, they both fail with the same error: libc++abi: terminating due to uncaught exception of type realm::sync::BadChangesetError: Unexpected intern index: 5201903. I wrote a test to apply the same instructions and I see no issue with it. I checked the OT rule and I can see nothing wrong with it either. Looking at the state applier logs, I see two download messages (each with 3 instructions) being applied, but you only mention one. There are also 4 local changesets. Is it the same test? And, how did you flip the messages? |
➤ On 2024-03-22, Sean Brandenburg commented: Hey [~daniel.tabacaru@mongodb.com] . These 2 output files are generated by our fuzz tests which try to apply the same changesets as the downloaded and uploaded messages with the apply to state tool. I just tried to run this again and it still seems to work from me. It looks like the --version command is broken for the realm-apply-to-state tool, but I downloaded my version of the tool within the last month or two. I've attached screenshots showing how I'm running the tool and what the resulting realm looks like. Both runs were done with a fresh realm file (it looks like in the verbose output I added earlier I had applied some other stuff to the realm, but the issue persists with a fresh realm) !correct.png|thumbnail! !incorrect.png|thumbnail! |
➤ On 2024-03-22, Sean Brandenburg commented: Also to you point about the log showing 2 downloads, I'm not super sure why that is. The input file only has 1 download changeset and 1 upload changeset, each with 3 instructions (and looking at the input file I do only see 1 of each) |
➤ On 2024-03-26, danieltabacaru commented: There is indeed a bug in the replication code. Setting a Mixed field to null generates two instructions, and the first one does not take is_default into account. If it is then merged with an instruction with is_default = true, it wins the conflict resolution (default values lose to non-default values) when maybe it shouldn't have (when both are default values, the timestamp is used as a tiebreak). |
➤ PM Bot commented: Jira ticket: RCORE-1980 |
Hi, I'm running into an odd issue with the StateApplierTool and applying conflicting isDefault writes. It looks like there may be some weirdness around the handling for null payloads/OT
The repro inputs are attached here and detailed below
This series of events correctly produces the following realm:
If we instead flip the upload and download messages (Upload Changeset #2 and Download Changeset #1) we get the following realm where the field "qu" gets set to null but "ur" is still set to the correct value from CS1
Verbose logs from state applier in the case that ends up with the incorrect result
The text was updated successfully, but these errors were encountered: