Skip to content

Conversation

@wangshao1
Copy link

No description provided.

@wangshao1 wangshao1 requested a review from AlexStocks January 10, 2024 08:28
@wangshao1 wangshao1 changed the title Feature/optimize blob feat: Feature/optimize blob Jan 10, 2024
// | char | varint64 | varint64 | varint64 | char |
// +------+-------------+----------+----------+-------------+
// +------+-------------+----------+----------+----------+-------------+
// | type | file number | offset | size | etime | compression |
Copy link

Choose a reason for hiding this comment

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

etime is too simple to make me confused, expire_time maybe better.

Copy link
Author

Choose a reason for hiding this comment

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

done

// `new_value` and `skip_until` are applicable to the decisions kChangeValue
// and kRemoveAndSkipUntil respectively, and have the same semantics as
// the corresponding parameters of FilterV2/V3.
virtual Decision FilterBlobByKey(int /*level*/, const Slice& /*key*/,
Copy link

Choose a reason for hiding this comment

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

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.

Copy link
Author

Choose a reason for hiding this comment

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

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.

return Status::OK();
}

Slice etime_slice = Slice(value.data() + value.size() - sizeof(uint64_t), sizeof(uint64_t));
Copy link

Choose a reason for hiding this comment

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

where is value format? the last 8 bytes is expire time?

Copy link
Author

Choose a reason for hiding this comment

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

format is define in pika project, and this pr is only used in pika.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants