Skip to content

Commit

Permalink
add sql.dev_rtx_parallel_scan. param.
Browse files Browse the repository at this point in the history
  • Loading branch information
YoshiakiNishimura committed Sep 27, 2024
1 parent b8d1f8f commit 7d8901c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/jogasaki/configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,14 @@ class configuration {
zone_offset_ = arg;
}

[[nodiscard]] bool rtx_parallel_scan() const noexcept {
return rtx_parallel_scan_;
}

void rtx_parallel_scan(bool arg) noexcept {
rtx_parallel_scan_ = arg;
}

friend inline std::ostream& operator<<(std::ostream& out, configuration const& cfg) {

//NOLINTBEGIN
Expand Down Expand Up @@ -510,6 +518,7 @@ class configuration {
print_non_default(lowercase_regular_identifiers);
print_non_default(zone_offset);
print_non_default(scan_block_size);
print_non_default(rtx_parallel_scan);

if(cfg.req_cancel_config()) {
out << "req_cancel_config:" << *cfg.req_cancel_config() << " "; \
Expand Down Expand Up @@ -566,6 +575,7 @@ class configuration {
bool lowercase_regular_identifiers_ = false;
std::int32_t zone_offset_ = 0;
std::size_t scan_block_size_ = 0;
bool rtx_parallel_scan_ = false;

};

Expand Down
1 change: 1 addition & 0 deletions src/jogasaki/api/impl/database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ void dump_public_configurations(configuration const& cfg) {
LOGCFG << "(dev_lowercase_regular_identifiers) " << cfg.lowercase_regular_identifiers() << " : whether to lowercase regular identifiers";
LOGCFG << "(zone_offset) " << cfg.zone_offset() << " : system time zone offset in minutes";
LOGCFG << "(scan_block_size) " << cfg.scan_block_size() << " : max records processed by scan operator before yielding to other task";
LOGCFG << "(dev_rtx_parallel_scan) " << cfg.rtx_parallel_scan() << " : whether to enable parallel scan for RTX";
}

status database::start() {
Expand Down
3 changes: 3 additions & 0 deletions src/jogasaki/api/resource/bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ bool process_sql_config(std::shared_ptr<jogasaki::configuration>& ret, tateyama:
if (auto v = jogasaki_config->get<std::size_t>("scan_block_size")) {
ret->scan_block_size(v.value());
}
if (auto v = jogasaki_config->get<bool>("dev_rtx_parallel_scan")) {
ret->rtx_parallel_scan(v.value());
}
return true;
}

Expand Down

0 comments on commit 7d8901c

Please sign in to comment.