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

Bump file format version #7977

Merged
merged 3 commits into from
Aug 12, 2024
Merged

Bump file format version #7977

merged 3 commits into from
Aug 12, 2024

Conversation

jedelbo
Copy link
Contributor

@jedelbo jedelbo commented Aug 12, 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

@@ -419,6 +419,7 @@ int Group::read_only_version_check(SlabAlloc& alloc, ref_type top_ref, const std
case 0:
file_format_ok = (top_ref == 0);
break;
case 24:
Copy link
Member

Choose a reason for hiding this comment

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

why this magic number here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the version(s) we can open in read-only mode

Copy link
Member

Choose a reason for hiding this comment

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

OK, got it, because v24 will be eventually rewritten in v25 after compression!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because we can read v24 without upgrade. If it is in read-only mode, we will not make any commits and therefore no compression will happen.

@@ -419,6 +419,7 @@ int Group::read_only_version_check(SlabAlloc& alloc, ref_type top_ref, const std
case 0:
file_format_ok = (top_ref == 0);
break;
case 24:
Copy link
Member

Choose a reason for hiding this comment

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

OK, got it, because v24 will be eventually rewritten in v25 after compression!

@jedelbo jedelbo force-pushed the je/upgrade-file-format branch from 870d2a6 to 97549be Compare August 12, 2024 13:21
@jedelbo jedelbo merged commit bb126af into next-major Aug 12, 2024
31 of 34 checks passed
@jedelbo jedelbo deleted the je/upgrade-file-format branch August 12, 2024 14:09
Copy link

Pull Request Test Coverage Report for Build jorgen.edelbo_387

Details

  • 25 of 26 (96.15%) changed or added relevant lines in 3 files are covered.
  • 56 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.01%) to 91.11%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/realm/group.cpp 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/realm/mixed.cpp 1 86.75%
src/realm/query_expression.hpp 1 93.81%
test/test_index_string.cpp 1 93.48%
src/realm/array_blobs_big.cpp 2 98.58%
src/realm/decimal128.cpp 2 59.79%
src/realm/group.cpp 2 89.6%
src/realm/sync/noinst/client_impl_base.cpp 2 82.78%
src/realm/util/future.hpp 3 95.94%
src/realm/util/assert.hpp 4 87.1%
src/realm/sync/noinst/server/server.cpp 6 74.5%
Totals Coverage Status
Change from base Build jorgen.edelbo_385: 0.01%
Covered Lines: 220025
Relevant Lines: 241493

💛 - Coveralls

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants