-
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
RCORE-1872 Sync client should allow server bootstrapping at any time #7440
Merged
Merged
Changes from 61 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
d09e4a3
First round of changes for server-initiated bootstraps
ae2574e
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
43391ca
Added test for role change bootstraps
35b1483
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
3424431
Updated test for handle role bootstraps
e0d6ac1
Updated baas/baasaas to use branch with fixes
f3eb7e0
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
7356ba2
updated changelog
9e32480
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
4431985
Updated test to verify bootstrap actually occurred
b87bc65
Fixed tsan warning
8447461
Move instead of copy
75a1d13
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
44d8e12
Updates from review; added comments to clarify bootstrap detection logic
944fb30
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
a9807d3
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
c0b1a49
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
60cb61e
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
37acf98
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
8d9557d
Updates from review
400aeba
Reworked test to fix msvc failure
4924597
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
5ea89e2
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
3ad02b6
Reverted baas branch to master and protocol version to 12
06bdc01
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
3198ebd
Added comments to changes needed when merging to master; update baas …
7902db0
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
fe86341
Merging in recommended changes
7a5269b
Pulled over changes from other branch and tweaking download params
0a26a71
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
c7a4739
Refactored tests to validate different bootstrap types
2355dd9
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
509c97b
Address test failures
8a00447
Updated tests to get passing using the server params
b7b7180
Updated debug statements role change tests
484f526
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
f29542b
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
4f09342
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
3c193ec
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
4a4f13f
Updated to support new batch_state protocol changes; updated tests
a497259
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
8ecfe34
Updated role change tests and merged test from separate PR
f1d9425
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
e375bfd
Fixed issue with flx query verion 0 not being treated as a bootstrap
c4f0344
Cleaned up the tests a bit and reworked query version 0 handling
2aa76d9
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
39af9d6
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
165a651
Added TODO to query 0 bootstrap detection
a72e158
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
b850cac
Updates from review; updated batch_state for schema bootstraps
e2cd353
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
9c7b7af
Removed extra mutex in favor of state machine's mutex
2fcdbec
Increased timeout when waiting for app initial sync to complete
83d2a5c
Updated role change test to use test commands
5f2a7e1
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
51b54eb
Fixed lint warning
93386d4
Update resume and ident message handling
7e2c5a7
Updated future waits for the pause/resume test command
b2fcf51
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
239d162
Added session connected event for when session multiplexing is disabled
841f1d8
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
0f00b92
Updates from review; updated baas commit to include timing fix
1ffddd0
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
04624e9
Removed todo comment
84a4c23
Added wait_until() to state machine to wait for callback; updated rol…
3e97840
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
c4e6a9e
Updates from review
3649284
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
aede51b
Updated changelog after release
0d55022
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
a40bafc
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I am not sure I understand this comment and why it has to be here (same below)
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 is primarily here so it doesn't get moved. The role change test needs to be notified of the session resumed/connected prior to sending the BIND message so it can queue up the test command to be sent before the IDENT message. If this notification happens after the BIND message, there isn't enough time for the test to queue up the test command before the IDENT message is sent.
I updated the message to hopefully be more clear.
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.
I see. I find it a bit hack-ish though. IIUC, there is a scheduling problem because
send_test_command
posts to the event loop. What if instead we updatem_pending_test_commands
directly under a lock? And then you can invoke send_test_command from the event loop when sending BIND (you actually don't need the lock if you create a new method only to be invoked from the event loop). Would that work for your tests? @jbreams what do you think of this approach?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.
I agree, but there isn't a good place to do this, unless I put plumbing in the sync session to add directly to the list of test commands. This is the only thing available in the event hook callback functions.
The current approach ensures the callback to add the test command gets
post
ed before the BIND message is sent and the callback forasync_write_binary()
is run on the event loop to send the next message after the BIND.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.
fwiw, i think this is fine for now. another approach could be to send the test commands when you get the 200 disconnect since i think we preserve the list of pending test commands across disconnects, but i wouldn't want to hold this project up over it.
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.
Yes - the list of test commands sticks around for the lifetime of the
ClientImpl::Session
and the only time commands are removed are when a response is received or the session object is destroyed.The current
send_test_command()
logic checks to make sure the session is currently active, but that is easy enough to update if needed.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.
the session only becomes inactive if you
pause()
it or destroy the realm - i think in the tests we have right now it should survive a disconnect/reconnect.