-
Notifications
You must be signed in to change notification settings - Fork 168
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 incorrect rebootstrap #7238
Conversation
…during actualization
Pull Request Test Coverage Report for Build daniel.tabacaru_696
💛 - Coveralls |
return SyncClientHookAction::NoAction; | ||
}; | ||
auto realm = Realm::get_shared_realm(triggered_config); | ||
interrupted.get(); |
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.
Don't we need to wait for the bootstrap to finish here for the test to really validate whether this fix has worked?
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.
As a matter of fact the test does finish, but it's not immediately obvious why. I think it helps the readability if we fulfil the promise after the message is integrated (I'll add some comments too).
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.
Should we check here that the subscription set version is zero and the subscription set state is Complete?
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.
will do
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.
thinking about it more, do we even need the promise in that case. could the test outside the event hook just wait for the subscription set to be complete?
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.
no. the subscription set is complete as part of the first session, but the second session and its session wrapper used to read the state of the subscription store at the wrong time.
What, How & Why?
Pausing and resuming the sync session at a very specific time may cause the next download message to be mistaken for a bootstrap message and crash the application.
Fixes #6611.
☑️ ToDos
[ ] C-API, if public C++ API changed[ ]bindgen/spec.yml
, if public C++ API changed