-
Notifications
You must be signed in to change notification settings - Fork 760
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
refactor: switch table meta encoding scheme to msgpack
#11592
Merged
BohuTANG
merged 4 commits into
databendlabs:main
from
dantengsky:refactor-switch-table-meta-encoding-scheme
Jun 2, 2023
Merged
refactor: switch table meta encoding scheme to msgpack
#11592
BohuTANG
merged 4 commits into
databendlabs:main
from
dantengsky:refactor-switch-table-meta-encoding-scheme
Jun 2, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
mergify
bot
added
the
pr-refactor
this PR changes the code base without new features or bugfix
label
May 26, 2023
dantengsky
force-pushed
the
refactor-switch-table-meta-encoding-scheme
branch
3 times, most recently
from
May 31, 2023 07:32
06a439b
to
0c3b9f2
Compare
dantengsky
changed the title
refactor(WIP): switch table meta encoding scheme
refactor: switch table meta encoding scheme to May 31, 2023
msgpack
dantengsky
force-pushed
the
refactor-switch-table-meta-encoding-scheme
branch
from
June 1, 2023 08:14
b6021c7
to
2155ab0
Compare
sundy-li
reviewed
Jun 1, 2023
sundy-li
reviewed
Jun 1, 2023
sundy-li
approved these changes
Jun 1, 2023
andylokandy
pushed a commit
to andylokandy/databend
that referenced
this pull request
Nov 27, 2023
…s#11592) * switch table meta encoding to msgpack * make `v4::Segment::to_bytes_with_encoding` private * refactor: gate the benchmark with feature `dev`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/
Summary
bincode
is excellent, except that it does not support schema evolution, which is an essential feature for us.switch table meta encoding format from bincode to msgpack
introduce table meta version 4
freeze table-meta related types in table meta v3
e.g.
TableSchema
,BlockMeta
,Statistics
,ColumnMeta
, etc. in modv3::frozen
, to make the upcoming meta type evolutions easier. non-frozen corresponding types could be "upgraded" as long asserde
can handle the backward compatibility issues, without bumping table meta version.but not all the types are (or easy to be) frozen in v3, e.g. the
Scalar
.backward compatibility test for releases 1.1.30, 1.1.38, 1.1.39, 1.1.46
the test scripts need to be refined (to avoid duplications of test cases), will be addressed in dedicated pr.
for reviewers:
the "evolution" cases I've come up with
https://github.com/datafuselabs/databend/blob/b6021c7fdd6a2c0f2da78237d1fc9317ecf3d349/src/query/service/tests/it/storages/fuse/meta/serialization_format_compatability.rs
If any other cases need to be tested, please let me know.
tasks:
pot
andmsgpack(named)
let's switch to msgpack
evaluating
msgpack(named)
benchmarks
for a fully compacted segment (1000 blocks, 23 columns),
time for decoding(decompress + deserialize) :
time for encoding( compress + serialize) :
size of binary:
segment_msgpack_bytes / segment_bincode_bytes: 1.5107816711590296
backward compact test
msgpack
's "named encoding" passes the following backward compact testhttps://github.com/datafuselabs/databend/blob/61ba1a9ff8a819d2cc0f71da60f131794c2e147e/src/query/service/tests/it/storages/fuse/meta/serialization_format_compatability.rs
benchmark :
https://github.com/datafuselabs/databend/blob/61ba1a9ff8a819d2cc0f71da60f131794c2e147e/src/query/storages/common/table-meta/benches/bench.rs
local result:
cargo bench -p storages-common-table-meta
Closes #issue