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.
RCORE-1386 Track client reset reason in table that detects client reset cycles #7649
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-1386 Track client reset reason in table that detects client reset cycles #7649
Changes from 4 commits
805add6
e2be13f
846cec6
09bf50d
f584b72
3f00c6b
c75a671
3d956c6
8a545c8
6911c0a
6c6d92d
4576d21
ef689f3
e0d3ae4
a5590c6
d2495e2
8982e3b
e4cd874
2c9497a
86c8f7f
15a4382
a4d9b25
b5615ba
e937bfc
9ab7502
901f7bc
038b50b
e3cb4e5
39293ac
a22984a
0df3099
1ef12b4
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.
can we just capture error_info in a member variable after this line rather than passing it as an argument to handle_fresh_realm_downloaded 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 now being saved to a member variable in
download_fresh_realm()
and no longer being passed tohandle_fresh_realm_downloaded()
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.
Sorry, my earlier comment was still in "Pending"...
I tried that, but saving it in
download_fresh_realm()
is too soon and caused issues if theSyncSession
was paused/resumed while a client reset is in progress - the error info was being consumed when the main Sync Session was manually resumed instead of when it was resumed after the fresh realm was downloaded.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.
This is not accurate anymore. It's still being passed to
handle_fresh_realm_downloaded
and that's where m_client_reset_error is updated.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.
💯
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.
Should we just capture the original SessionErrorInfo that caused the client reset here?
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.
Since
SessionErrorInfo
can't be default created and there are only a few parts needed, I don't think we need to. I did remove therecovery_is_allowed
since it is no longer 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.
isn't there always an error?
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, there is - I had made it optional since
Status
doesn't have a default constructor andClientReset
is default constructed and then populated throughout the code.I could add an appropriate constructor and remove the
optional
if you prefer.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.
why don't we just store the reason? I think that's all we need.
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 may be helpful to have the error code as well and it shouldn't be that expensive to store...
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.
right. it does feel a bit wrong to have the error optional though
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.
Updated the
ClientReset
structure soerror
is no longer an optional and updated the usages to use the initializers.