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

Make sync session multiplexing on-by-default #6557

Merged
merged 11 commits into from
May 10, 2023

Conversation

jbreams
Copy link
Contributor

@jbreams jbreams commented May 1, 2023

What, How & Why?

This updates the sync client's default configuration so that session multi-plexing is on-by-default. The test suite where session multiplexing was enabled now tests the sync client with multiplexing disabled. The enable_session_multiplexing() method on SyncManager is now set_session_multiplexing() which lets you explicitly set it to enabled or disabled regardless of how realm was compiled. I also added some object-store level integration tests that test that the function works.

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed.

@cla-bot cla-bot bot added the cla: yes label May 4, 2023
fi

if [ -n "${enable_sync_multiplexing|}" ]; then
set_cmake_var realm_vars REALM_ENABLE_SYNC_MULTIPLEXING BOOL On
if [ -n "${enable_llvm_coverage|}" ]; then
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure why these switched places? I guess a weird artifact of a git merge?

@jbreams jbreams marked this pull request as ready for review May 9, 2023 20:06
CMakeLists.txt Outdated Show resolved Hide resolved
Copy link
Contributor

@michael-wb michael-wb left a comment

Choose a reason for hiding this comment

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

LGTM - just one tiny change

Comment on lines 103 to 104
if [ -n "${disable_sync_multiplexing|}" ]; then
set_cmake_var realm_vars REALM_DISABLE_SYNC_MULTIPLEXING BOOL On
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to update this to match the REALM_SYNC_MULTIPLEXING cmake flag

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

Comment on lines 736 to 741
SECTION("allowed") {
sync_multiplexing_allowed = true;
}
SECTION("not allowed") {
sync_multiplexing_allowed = false;
}
Copy link
Contributor

@michael-wb michael-wb May 10, 2023

Choose a reason for hiding this comment

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

This is cool how we can just do this to minimizing the code dups

Copy link
Member

Choose a reason for hiding this comment

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

This is actually not great as it results in Catch not reporting which mode failed if the test does fail, as the failure won't happen inside the section. bool sync_multiplexing_allowed = GENERATE(false, true); fixes that and is a bit shorter as a bonus.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Neat, I didn't know about GENERATE(). That's a good tip.

@jbreams jbreams merged commit 919b98c into master May 10, 2023
2 checks passed
@jbreams jbreams deleted the jbr/multiplexing_by_default branch May 10, 2023 21:58
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants