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

Add support for multiplexing and SyncTimeoutOptions #1578

Merged
merged 7 commits into from
Nov 28, 2023

Conversation

cmelchior
Copy link
Contributor

@cmelchior cmelchior commented Nov 21, 2023

Closes #971

This should also put some hooks in place to make it easier to control initial sync performance as reported by the internal help ticket here https://jira.mongodb.org/browse/HELP-47093

Terminology and API docs have been copied from the Swift implementation: realm/realm-swift#8282

This PR will not enable multiplexing by default, this is left for a future release.

It hasn't been possible to write an integration test for this, but I verified the changes manually by inspecting the logs, which at least shows the PING changes:

2023-11-20 22:07:52.745 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Sending: PING(timestamp=227610113, rtt=0)
2023-11-20 22:07:52.748 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Received: PONG(timestamp=227610113)
2023-11-20 22:07:52.748 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Round trip time was 3 milliseconds
2023-11-20 22:07:52.748 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Will emit a ping in 5503 milliseconds
2023-11-20 22:07:58.259 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Sending: PING(timestamp=227615627, rtt=3)
2023-11-20 22:07:58.261 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Received: PONG(timestamp=227615627)
2023-11-20 22:07:58.261 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Round trip time was 3 milliseconds
2023-11-20 22:07:58.261 24646-24700 REALM                   io.realm.sync.testapp                D  [Core] Connection[1]: Will emit a ping in 5591 milliseconds

And the debugger shows the values being set

image

Copy link
Contributor

@rorbech rorbech left a comment

Choose a reason for hiding this comment

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

Minor comments ... and when actually verified by CI (currently offline, so PR is not verified even though green).

Copy link
Contributor

@clementetb clementetb left a comment

Choose a reason for hiding this comment

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

Looks great! Some minor comments.

CHANGELOG.md Outdated Show resolved Hide resolved
cmelchior and others added 3 commits November 28, 2023 07:46
Co-authored-by: Nabil Hachicha <[email protected]>
Co-authored-by: Claus Rørbech <[email protected]>
Co-authored-by: clementetb <[email protected]>
…ngodb/AppConfiguration.kt

Co-authored-by: Claus Rørbech <[email protected]>
Copy link
Collaborator

@nhachicha nhachicha left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@rorbech rorbech changed the title Add support for multiplexing (enabled by default) and SyncTimeoutOptions Add support for multiplexing and SyncTimeoutOptions Nov 28, 2023
Copy link
Contributor

@rorbech rorbech left a comment

Choose a reason for hiding this comment

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

Some very minor comments.

@cmelchior cmelchior merged commit 6460014 into main Nov 28, 2023
2 checks passed
@cmelchior cmelchior deleted the cm/sync-timeout-options branch November 28, 2023 17:29
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AppConfiguration - SyncTimeoutOptions
4 participants