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

RCORE-2212 Make apply-to-state tool handle all batch states properly #7938

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jbreams
Copy link
Contributor

@jbreams jbreams commented Jul 31, 2024

What, How & Why?

☑️ ToDos

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

Copy link

Pull Request Test Coverage Report for Build jonathan.reams_3390

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 96 unchanged lines in 21 files lost coverage.
  • Overall coverage decreased (-0.01%) to 91.105%

Files with Coverage Reduction New Missed Lines %
src/realm/query_expression.hpp 1 93.81%
src/realm/sort_descriptor.cpp 1 94.06%
src/realm/uuid.cpp 1 98.48%
test/test_index_string.cpp 1 93.48%
test/test_query2.cpp 1 98.73%
src/realm/object-store/shared_realm.cpp 2 91.89%
src/realm/sync/network/http.hpp 2 82.27%
src/realm/table_view.cpp 2 92.99%
test/test_lang_bind_helper.cpp 2 93.2%
src/realm/mixed.cpp 3 86.46%
Totals Coverage Status
Change from base Build 2532: -0.01%
Covered Lines: 216827
Relevant Lines: 237996

💛 - Coveralls

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.

Do you think we should add a comment to the header for the get_current_protocol_version() function as a reminder to verify the apply_to_state_command tool works with the new protocol version?

auto transact = bool(flx_sync_arg) ? local_db->start_write() : local_db->start_read();
TransactionRef tr;
switch (download_message.batch_state) {
case realm::sync::DownloadBatchState::SteadyState:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it OK that these changes aren't backwards compatible with sync messages from before sync protocol version 14? I am assuming so, since the history.integrate_server_changesets() function isn't going to work with older messages since it is explicitly looking for the DownloadBatchState::SteadyState value that was introduced in version 14.

Perhaps we should include the get_current_protocol_version() output in the help text to indicate which protocol version "should" be supported?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants