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.
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-2185 Sync client should steal file ident of fresh realm when performing client reset #7850
RCORE-2185 Sync client should steal file ident of fresh realm when performing client reset #7850
Changes from 21 commits
520faad
b1b1dd9
5e1e1e9
73ad369
f5e1044
1d3ca5b
4b02363
9c38925
3a2af9a
aae37b7
6842197
2ddca98
86ca88a
005fea6
705a114
59a7b51
5072e32
1e51055
427d8fe
c82d03b
bacdd57
49ec153
f5569c1
043a470
f7d915c
49a5016
aa50680
d88f2e4
85abf4b
6a426a3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 local upload progress is actually updated, but no upload messages are sent
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.
In a fresh realm the only uploads we would normally be sending are download acknowledgements. If there was just another branch here to return early if sending upload acks is disabled, would that be sufficient? Also, is checking at this layer whether this sync::Session is a fresh realm right? Should we be checking that up in the object-store layer as an option when starting the session?
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 would be enough indeed. we still need to make sure that queries are sent.
I think we usually do that. The annoying part is that we need to access that flag through several layers.
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.
By the time you reach here you've already advanced your local upload cursor so sending queries should Just Work Normally™️.
I was under the impression that checking whether a realm is a "fresh" realm happens mostly in object-store? Where else down in sync::Session do we check if the realm ends in ".fresh"?
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 quoted the wrong sentence.
I think the idea is to not advance the upload cursor at all. I'm checking to see if that's actually really 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.
Advancing the upload cursor is what got us into
Last integrated client version on server cannot be greater than the latest client version in existence
unfortunately.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.
But if we never send an upload message, won't the server send 0, so the server version will never be greater than the local version?
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.
by "advancing the local upload cursor", all i really mean is calling find_uploadable_changesets() here. That just updates the in-memory state of what the sync client thinks its already processed, but doesn't necessarily have to send an upload. This is what we already do for empty uploads.
I don't know what you mean by the server sending zero so the server version will never be greater than the local version.
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 what you mean now. We advance the upload cursor as if we ack the downloads. I think your suggestion to return early in
send_upload_message()
would work then.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.
not really doing anything in that sense to justify the comment