Skip to content

Commit

Permalink
[fix][store]Add dbstatistics log
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuRuoyu01 committed Jan 13, 2025
1 parent a5f7633 commit 8923900
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/coprocessor/coprocessor_v2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@

namespace dingodb {

DEFINE_bool(enable_coprocessor_v2_statistics_time_consumption, false, "enable coprocessor_v2 statistics time consumption default is false");
DEFINE_bool(enable_coprocessor_v2_statistics_time_consumption, false,
"enable coprocessor_v2 statistics time consumption default is false");

bvar::Adder<uint64_t> CoprocessorV2::bvar_coprocessor_v2_object_running_num("dingo_coprocessor_v2_object_running_num");
bvar::Adder<uint64_t> CoprocessorV2::bvar_coprocessor_v2_object_total_num("dingo_coprocessor_v2_object_total_num");
Expand Down Expand Up @@ -551,7 +552,8 @@ butil::Status CoprocessorV2::DoRelExprCoreWrapper(const std::string& key, const
int ret = 0;
try {
// decode some column. not decode all
ret = original_record_decoder_->Decode(key, value, selection_column_indexes_, original_record);
ret = original_record_decoder_->Decode(key, value, selection_column_indexes_, selection_column_indexes_serial_,
original_record);
} catch (const std::exception& my_exception) {
std::string error_message = fmt::format("serial::Decode failed exception : {}", my_exception.what());
DINGO_LOG(ERROR) << error_message;
Expand Down
1 change: 1 addition & 0 deletions src/engine/rocks_raw_engine.cc
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ rocksdb::DB* RocksRawEngine::InitDB(const std::string& db_path, rocks::ColumnFam
db_options.max_subcompactions = db_options.max_background_jobs / 4 * 3;
db_options.stats_dump_period_sec = ConfigHelper::GetRocksDBStatsDumpPeriodSec();
db_options.use_direct_io_for_flush_and_compaction = true;
db_options.statistics=rocksdb::CreateDBStatistics();

DINGO_LOG(INFO) << fmt::format("[rocksdb] config max_background_jobs({}) max_subcompactions({})",
db_options.max_background_jobs, db_options.max_subcompactions);
Expand Down

0 comments on commit 8923900

Please sign in to comment.