-
Notifications
You must be signed in to change notification settings - Fork 171
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-1973 Add role/permissions tests for new bootstrap feature #7675
Merged
Merged
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
67691ce
Moved role change tests to separate test file
2d304d5
Fixed building of new flx_role_change.cpp file
8d91a08
Added local changes w/role bootstrap test - fixed exception in subscr…
e8924dc
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
ac79b1f
Updated local change test to include valid offline writes during role…
b78283e
Added role change test during initial schema bootstrap
d350217
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
f9aec9b
Updated changelog
2d908be
Wrapped up role change during bootstrap tests
1878811
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
89b2c39
Removed debug statments to fix thread sanitizer
363581c
Updated sub state comments and reverted a minor change
990da9e
updates from review
fb91292
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
5ad76e9
Refactored role change tests and broke out into 2 separate test cases
2eb382e
Moved harness from a global to a static var in each test case
6092943
Reverted resetting the bootstrapping subscription state back to Pending
560cdb3
Updated baas to use protocol v14 and removed the feature flag for rol…
7951ef2
Removed left over code in statement...
304e658
Updated baasaas version to be a cached version
6994a85
Updated baasaas githash and reordered role change during bootstrap to…
579c50d
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
7983f9d
Minor updates to reuse the verify_records() fcn
3f17ce6
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
524261a
Updates from review
48497b1
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
2d67e5d
Updated changelog after release
2d27215
Fixed one more comment in changelog
7ee0ad0
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
75c9654
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
321b889
RCORE-2174 Bootstrap store is not being reset if initial subscription…
9f4b041
Merge branch 'feature/role-change' of github.com:realm/realm-core int…
f869865
Updated changelog comments
2e5a010
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
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.
shouldn't new_version always be either
m_flx_last_seen_version
,m_flx_active_version
orm_flx_active_version+1
?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.
If a query bootstrap is in progress when a server initiated bootstrap takes place (which cancels the current query bootstrap),
m_flx_last_seen_version
will bem_flx_active_version + 1
whilenew_version
will bem_flx_active_version
and this assertion will fail.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's still one of the cases I mentioned. I was proposing we update the assert, not keep the deleted one.
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
m_flx_last_seen_version
can actually be greater thanm_flx_active_version + 1
in the case of a QUERY_ERROR response and it always starts out at 0 when the session is started until the first download message is received. Since the current validation and checking for server-initiated bootstrap logic is valid, I am going to leave this as-is.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 seems that
m_flx_last_seen_version
should be updated when we get a query error then.m_flx_active_version
is initialized though when the SessionWrapper is actualized. Either way, your call.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 would update it, but this is a change that might affect progress notifications, which uses this value. I created RCORE-2173 to handle updating this separately if we want to update it.