Skip to content

Commit

Permalink
implemented blob : gc limit
Browse files Browse the repository at this point in the history
  • Loading branch information
ban-nobuhiro committed Jan 20, 2025
1 parent e9d9212 commit c0319cb
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/concurrency_control/garbage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include "concurrency_control/include/wp.h"

#include "database/include/logging.h"
#include "datastore/limestone/include/datastore.h"
#include "datastore/limestone/include/limestone_api_helper.h"

#include "index/yakushima/include/interface.h"

Expand Down Expand Up @@ -91,6 +93,9 @@ void work_manager() {
} else {
set_min_batch_epoch(epoch::get_cc_safe_ss_epoch());
}
#ifdef PWAL
switch_available_boundary_version(shirakami::datastore::get_datastore(), std::min(get_min_step_epoch(), get_min_batch_epoch()));
#endif

sleepUs(epoch::get_global_epoch_time_us());
}
Expand Down
2 changes: 2 additions & 0 deletions src/datastore/limestone/include/limestone_api_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ void recover(limestone::api::datastore* ds);

void switch_epoch(limestone::api::datastore* ds, epoch::epoch_t ep);

void switch_available_boundary_version(limestone::api::datastore* ds, epoch::epoch_t ep);

// log_channel

void add_entry(limestone::api::log_channel* lc,
Expand Down
14 changes: 14 additions & 0 deletions src/datastore/limestone/limestone_api_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,20 @@ void switch_epoch(limestone::api::datastore* ds, epoch::epoch_t ep) {
shirakami_ex_log_exit << "datastore::switch_epoch()";
}

void switch_available_boundary_version(limestone::api::datastore* ds, epoch::epoch_t ep) {
if (ds == nullptr) {
LOG_FIRST_N(ERROR, 1) << log_location_prefix << "unreachable path";
return;
}
shirakami_ex_log_entry << "datastore::switch_available_boundary_version()";
#if 0 // link error
ds->switch_available_boundary_version(limestone::api::write_version_type(ep, 0UL));
#else
(void)ds; (void)ep;
#endif
shirakami_ex_log_exit << "datastore::switch_available_boundary_version()";
}

// log channel

void add_entry(limestone::api::log_channel* lc,
Expand Down

0 comments on commit c0319cb

Please sign in to comment.