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

Using File System "Punch Hole" API for GC #313

Open
wants to merge 23 commits into
base: master
Choose a base branch
from

Conversation

v01dstar
Copy link
Contributor

@v01dstar v01dstar commented Apr 5, 2024

No description provided.

Signed-off-by: v01dstar <[email protected]>
@zhangjinpeng87
Copy link
Member

@v01dstar Please add design doc PR for this large change.

Signed-off-by: tonyxuqqi <[email protected]>
tonyxuqqi and others added 9 commits April 25, 2024 00:54
Signed-off-by: tonyxuqqi <[email protected]>
Signed-off-by: tonyxuqqi <[email protected]>
Signed-off-by: tonyxuqqi <[email protected]>
Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: Yang Zhang <[email protected]>
Signed-off-by: Yang Zhang <[email protected]>
@v01dstar v01dstar force-pushed the gc-punch-hole branch 2 times, most recently from 64929a4 to ef34a73 Compare May 15, 2024 22:02
Signed-off-by: v01dstar <[email protected]>
@@ -232,13 +234,11 @@ void TitanTableBuilder::FinishBlobFile() {
AddBlobResultsToBase(contexts);

if (s.ok() && ok()) {
TITAN_LOG_INFO(db_options_.info_log,
Copy link
Member

Choose a reason for hiding this comment

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

why remove

@@ -201,6 +201,8 @@ class TitanDB : public StackableDB {
// "rocksdb.titandb.discardable_ratio_le100_file_num" - returns count of
// file whose discardable ratio is less or equal to 100%.
static const std::string kNumDiscardableRatioLE100File;

static const std::string kNumHolePunchableBlocks;
Copy link
Member

Choose a reason for hiding this comment

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

please add the comment

@@ -319,7 +440,38 @@ Status TitanDBImpl::TEST_StartGC(uint32_t column_family_id) {
bg_gc_running_++;
bg_gc_scheduled_++;

s = BackgroundGC(&log_buffer, column_family_id);
Copy link
Member

Choose a reason for hiding this comment

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

why don't reuse BackgroundGC anymore?

LogFlush(db_options_.info_log.get());
mutex_.Lock();
bool run_punch_hole_gc = false;
if (scheduled_punch_hole_gc_ != nullptr && !punch_hole_gc_running_) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we separate the punch hole code path with the normal GC for brevity?

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