-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Introduce the block version ref key #1969
base: master
Are you sure you want to change the base?
Conversation
619af2a
to
0044bdf
Compare
cpp/arcticdb/version/block_key.hpp
Outdated
|
||
BlockKey(KeyType key_type, StreamId id, std::unordered_map<StreamId, AtomKey> keys); | ||
|
||
BlockKey block_with_same_keys(StreamId new_id); |
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.
block_with_same_id?
cpp/arcticdb/version/block_key.hpp
Outdated
bool valid_{true}; | ||
KeyType block_key_type_; | ||
StreamId id_; | ||
KeyType expected_key_type_of_contents_; |
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.
probably expected_key_type_ is fine
cpp/arcticdb/version/block_key.cpp
Outdated
|
||
namespace arcticdb::version_store { | ||
|
||
BlockKey::BlockKey(KeyType key_type, StreamId id, SegmentInMemory &&segment) { |
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.
I'm not totally sold on the name, I don't think it really reflects what the class does. Even KeyBlock might be better as it expresses what it is - i.e. a block of keys.
efd06a8
to
4a691ba
Compare
Useful for background jobs.
See design doc shared internally - https://manwiki.maninvestments.com/x/n4CsFg .
test_snapshot.cpp
has rotted and wasn't included in any cmake targets (so hasn't compiled for months or ever). Since it didn't check anything very useful, I've just removed it here.An alternative design would be to store the segment sorted by stream ID, like we do for snapshots, and work with it directly rather than transforming it in to an
unordered_map
. This would save us the cost of transforming the segment to theunordered_map
and back again. I plan to see how the current implementation performs in replication and we can swap out to the other idea at any time until we release this (the point of no return is once unordered block ref keys are serialized in production).