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

expose seqno from compaction filter and iterator #215

Merged
merged 3 commits into from
Dec 9, 2020

Conversation

hicqu
Copy link

@hicqu hicqu commented Dec 2, 2020

This PR supports to access seqno for every key/value pairs in compaction filter or iterator.
It's helpful to enhance GC in compaction filter in TiKV.

@hicqu hicqu force-pushed the compaction-filter-seqno branch from d5e7bbb to d827a00 Compare December 7, 2020 08:40
@hicqu hicqu changed the title allow to get sequence number for iterator expose seqno from compaction filter and iterator Dec 7, 2020
@hicqu hicqu force-pushed the compaction-filter-seqno branch from d827a00 to 2dcd150 Compare December 7, 2020 08:51
// Return the sequence number for the current entry if it's available.
// Return false if it's not available.
// REQUIRES: Valid()
virtual bool seqno(SequenceNumber* /*seqno*/) const { return false; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you need to update titan to support this method?

Copy link
Author

Choose a reason for hiding this comment

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

It's not necessary because now we only use it for write CF, which its value is very small.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's still update Titan. It sounds like a 坑 in the future.

Signed-off-by: qupeng <[email protected]>
Copy link
Member

@Connor1996 Connor1996 left a comment

Choose a reason for hiding this comment

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

LGTM, though this API is weird for others.🤣

Copy link
Collaborator

@yiwu-arbug yiwu-arbug left a comment

Choose a reason for hiding this comment

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

LGTM

@yiwu-arbug yiwu-arbug merged commit fbbe2c8 into tikv:6.4.tikv Dec 9, 2020
@hicqu hicqu deleted the compaction-filter-seqno branch December 9, 2020 07:20
@tabokie tabokie mentioned this pull request May 9, 2022
39 tasks
tabokie pushed a commit to tabokie/rocksdb that referenced this pull request May 12, 2022
This PR supports to access `seqno` for every key/value pairs in compaction filter or iterator.
It's helpful to enhance GC in compaction filter in TiKV.

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>
tabokie pushed a commit that referenced this pull request May 12, 2022
This PR supports to access `seqno` for every key/value pairs in compaction filter or iterator.
It's helpful to enhance GC in compaction filter in TiKV.

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>
v01dstar pushed a commit to v01dstar/rocksdb that referenced this pull request Feb 21, 2024
This PR supports to access `seqno` for every key/value pairs in compaction filter or iterator.
It's helpful to enhance GC in compaction filter in TiKV.

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>
v01dstar pushed a commit to v01dstar/rocksdb that referenced this pull request Feb 22, 2024
compaction_filter: add bottommost_level into context (tikv#160)

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>

add range for compaction filter context (tikv#192)

* add range for compaction filter context

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>

allow no_io for VersionSet::GetTableProperties (tikv#211)

* allow no_io for VersionSet::GetTableProperties

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>

expose seqno from compaction filter and iterator (tikv#215)

This PR supports to access `seqno` for every key/value pairs in compaction filter or iterator.
It's helpful to enhance GC in compaction filter in TiKV.

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>

allow to query DB stall status (tikv#226)

This PR adds a new property is-write-stalled to query whether the column family is in write stall or not.

In TiKV there is a compaction filter used for GC, in which DB::write is called. So if we can query whether the DB instance is stalled or not, we can skip to create more compaction filter instances to save some resources.

Signed-off-by: qupeng <[email protected]>
Signed-off-by: tabokie <[email protected]>

Fix compatibilty issue with Titan

Signed-off-by: v01dstar <[email protected]>

filter deletion in compaction filter (tikv#344)

And delay the buffer initialization of writable file to first actual write.

---------

Signed-off-by: tabokie <[email protected]>

Adjustments for compaptibilty with 8.10.facebook

Signed-off-by: v01dstar <[email protected]>

Adjust tikv related changes with upstream

Signed-off-by: v01dstar <[email protected]>
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.

3 participants