[go: up one dir, main page]

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

Upload Progress Notifications are not being reported upon completion of a FLX client reset with no local changes. #7964

Closed
sync-by-unito bot opened this issue Aug 7, 2024 · 9 comments
Assignees

Comments

@sync-by-unito
Copy link
sync-by-unito bot commented Aug 7, 2024

While creating the tests to validate the upload progress notifications after a client reset is complete, it was discovered that, upon the completion of a client reset for a flexible sync session with no local changes, an upload progress notification is not being generated.

Similar to the completion of a PBS client reset with no local changes, an upload progress with uploadable and uploaded values of 0 and an estimate of 1.0 should be issued after a client reset for a FLX session without any local changes to indicate the client reset is complete. This also applies for a discard local client reset, which discards any pending changes.

If there are pending local changes when the client reset occurs for a FLX session, then upload progress notifications are being reported.

Copy link
Author
sync-by-unito bot commented Aug 7, 2024

➤ PM Bot commented:

Jira ticket: RCORE-2231

@tgoyne
Copy link
Member
tgoyne commented Aug 7, 2024

Why should a client reset with no local changes produce an upload progress notification? Nothing about the upload progress has changed, and PBS resets producing one seems like a bug?

Copy link
Author
sync-by-unito bot commented Aug 7, 2024

➤ michael-wb commented:

[~thomas.goyne@mongodb.com] - I was thinking the upload progress notification could be used to wait for a client reset to complete; since there are upload notifications reported when the local changes are recovered, a report of uploadable/uploaded of 0 and an estimate of 1.0 would mean that the client reset is complete and the upload progress is up to date (or nothing needed to be uploaded).

@tgoyne
Copy link
Member
tgoyne commented Aug 7, 2024

That seems like a very indirect and incorrect way to wait for client resets to complete. Client resets with recovery also shouldn't be producing upload progress notifications unless the bytes to upload changed as part of the recovery.

@michael-wb
Copy link
Contributor
michael-wb commented Aug 7, 2024

I would think that the upload of the pending changes that were recovered after the client reset should definitely generate progress notifications, since they still needed to be uploaded and would have produced notifications if the client reset had not happened.

So, based on your recommendation, should the progress notifications never report an upload progress of [uploadble: 0, uploaded: 0, estimate: 0.0 (or 1.0)]?

@tgoyne
Copy link
Member
tgoyne commented Aug 7, 2024

We send an initial notification on registration, and if that happens to be zero bytes to upload then that's fine. I don't see why we'd ever send another notification with uploadable=0 unless it became non-zero and then was set back to zero.

There's nothing special about the recovered changes wrt to progress notifications. If the recovery doesn't change the size of the changesets waiting to be recovered, I would not expect the existence of a client reset to be observable at all via an upload progress notification.

@michael-wb
Copy link
Contributor

I don't see why we'd ever send another notification with uploadable=0 unless it became non-zero and then was set back to zero.

Isn't this what's happening during the client reset? The uploadable (and uploaded) values were likely non-zero before the client reset and now they have both been reset back to zero.

FYI - I've posted a message in slack to open the discussion up to the team.

@tgoyne
Copy link
Member
tgoyne commented Aug 8, 2024

If there's no local changes to recover then a client reset should not be changing uploadable or uploaded. Resetting them to zero is a recent change that I think is incorrect.

@sync-by-unito sync-by-unito bot closed this as completed Aug 12, 2024
Copy link
Author
sync-by-unito bot commented Aug 12, 2024

➤ michael-wb commented:

This is no longer going to be done - a progress report will not be generated at the end of a client reset if there are no pending local or recovered changes.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 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

No branches or pull requests

2 participants