Open
Conversation
AlexStocks
approved these changes
Jan 12, 2024
hotjump
reviewed
Jan 12, 2024
db/blob/blob_index.h
Outdated
| // | char | varint64 | varint64 | varint64 | char | | ||
| // +------+-------------+----------+----------+-------------+ | ||
| // +------+-------------+----------+----------+----------+-------------+ | ||
| // | type | file number | offset | size | etime | compression | |
There was a problem hiding this comment.
etime is too simple to make me confused, expire_time maybe better.
hotjump
reviewed
Jan 12, 2024
| @@ -332,6 +332,7 @@ class CompactionFilter : public Customizable { | |||
| // and kRemoveAndSkipUntil respectively, and have the same semantics as | |||
| // the corresponding parameters of FilterV2/V3. | |||
| virtual Decision FilterBlobByKey(int /*level*/, const Slice& /*key*/, | |||
There was a problem hiding this comment.
the args expire_time seems do nothing, and in db/blob/db_blob_compaction_test.cc, the FilterBlobByKey function of derived class is not be modified.
Author
There was a problem hiding this comment.
derived compactionfilter will implement FilterBlobByKey to determine if drop this kv according to expire_time.
since pika store ttl in value,this can skip blobfile random read during compaction.
db/blob/blob_file_builder.cc
Outdated
| return Status::OK(); | ||
| } | ||
|
|
||
| Slice etime_slice = Slice(value.data() + value.size() - sizeof(uint64_t), sizeof(uint64_t)); |
There was a problem hiding this comment.
where is value format? the last 8 bytes is expire time?
Author
There was a problem hiding this comment.
format is define in pika project, and this pr is only used in pika.
This file contains hidden or 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
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.
No description provided.