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

Fix version corruption during client reset with recovery with a single FLX subscription #6170

Merged
merged 4 commits into from
Jan 5, 2023

Conversation

jbreams
Copy link
Contributor

@jbreams jbreams commented Jan 4, 2023

What, How & Why?

This fixes a crash if client reset with recovery is used when flexible sync is enabled and there is only one subscription set defined. For a write-up of how the crash occurs, see #6070.

☑️ ToDos

  • 📝 Changelog update
  • 🚦 Tests (or not relevant)
  • C-API, if public C++ API changed.

@cla-bot cla-bot bot added the cla: yes label Jan 4, 2023
@jbreams jbreams marked this pull request as ready for review January 4, 2023 18:05
@jbreams jbreams requested review from ironage and michael-wb January 4, 2023 18:05
Copy link
Contributor

@ironage ironage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent analysis and good catch. Thanks for this fix!

@@ -612,7 +611,7 @@ LocalVersionIDs perform_client_reset_diff(DBRef db_local, DBRef db_remote, sync:
// partially recovered, but interrupted may continue sync the next time it is
// opened with only partially recovered state while having lost the history of any
// offline modifications.
history_local->set_client_file_ident_in_wt(current_version_local, client_file_ident);
history_local->set_client_file_ident_in_wt(wt_local->get_version(), client_file_ident);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

Copy link
Contributor

@michael-wb michael-wb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@jbreams jbreams merged commit 166bd56 into master Jan 5, 2023
@jbreams jbreams deleted the jbr/client_reset_recovery_version_corruption branch January 5, 2023 04:18
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertion failed: !referenced thrown when triggering a Client Reset Event using a FLX app.
3 participants