-
Notifications
You must be signed in to change notification settings - Fork 174
RCORE-2135 Make AsyncOpenTask wait until all pending subscriptions finish bootstrapping #7723
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
Conversation
9c0047e
to
45629ff
Compare
Pull Request Test Coverage Report for Build daniel.tabacaru_849Details
💛 - Coveralls |
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.
it looks good in regard to the new logic, but I think we should remove the rerun on launch flag, don't we?
@@ -108,15 +108,21 @@ void AsyncOpenTask::unregister_download_progress_notifier(uint64_t token) | |||
m_session->unregister_progress_notifier(token); | |||
} | |||
|
|||
void AsyncOpenTask::attach_to_subscription_initializer(AsyncOpenCallback&& callback, | |||
std::shared_ptr<_impl::RealmCoordinator> coordinator, | |||
bool rerun_on_launch) |
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.
So it seems we are going to ignore the rerun_on_launch flag. Don't we have to remove it from the configuration.
bool rerun_init_subscription_on_open{false};
... also isn't this going to be a breaking change for the SDKs? Am I wrong?
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.
So it seems we are going to ignore the rerun_on_launch flag.
Not entirely. We do use it in the RealmCoordinator to decide if the subscription initializer callback is invoked or not.
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.
OK, I tested it and it looks good! Approved. But we have an address sanitizer issue:
==1892==ERROR: AddressSanitizer: access-violation on unknown address 0x0066b552a870 (pc 0x0066b552a870 bp 0x000000000000 sp 0x0066b5528128 T0)
yeah, I am looking into it. All the other tasks fail because the realm file is accessed from a different thread. |
6a96bed
to
0870c47
Compare
What, How & Why?
Opening an FLX realm asynchronously may not wait to download all data. We changed it so the asynchronous task now waits until all subscriptions finish bootstrapping.
Fixes #7720.
☑️ ToDos
[ ] C-API, if public C++ API changed[ ]bindgen/spec.yml
, if public C++ API changed