Skip to content

Commit d1e195b

Browse files
LiuRuoyu01rock-git
authored andcommitted
[fix][store]Add dbstatistics log
1 parent a5f7633 commit d1e195b

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/coprocessor/coprocessor_v2.cc

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@
3838

3939
namespace dingodb {
4040

41-
DEFINE_bool(enable_coprocessor_v2_statistics_time_consumption, false, "enable coprocessor_v2 statistics time consumption default is false");
41+
DEFINE_bool(enable_coprocessor_v2_statistics_time_consumption, false,
42+
"enable coprocessor_v2 statistics time consumption default is false");
4243

4344
bvar::Adder<uint64_t> CoprocessorV2::bvar_coprocessor_v2_object_running_num("dingo_coprocessor_v2_object_running_num");
4445
bvar::Adder<uint64_t> CoprocessorV2::bvar_coprocessor_v2_object_total_num("dingo_coprocessor_v2_object_total_num");
@@ -551,7 +552,8 @@ butil::Status CoprocessorV2::DoRelExprCoreWrapper(const std::string& key, const
551552
int ret = 0;
552553
try {
553554
// decode some column. not decode all
554-
ret = original_record_decoder_->Decode(key, value, selection_column_indexes_, original_record);
555+
ret = original_record_decoder_->Decode(key, value, selection_column_indexes_, selection_column_indexes_serial_,
556+
original_record);
555557
} catch (const std::exception& my_exception) {
556558
std::string error_message = fmt::format("serial::Decode failed exception : {}", my_exception.what());
557559
DINGO_LOG(ERROR) << error_message;

src/engine/rocks_raw_engine.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,7 @@ rocksdb::DB* RocksRawEngine::InitDB(const std::string& db_path, rocks::ColumnFam
914914
db_options.max_subcompactions = db_options.max_background_jobs / 4 * 3;
915915
db_options.stats_dump_period_sec = ConfigHelper::GetRocksDBStatsDumpPeriodSec();
916916
db_options.use_direct_io_for_flush_and_compaction = true;
917+
db_options.statistics=rocksdb::CreateDBStatistics();
917918

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

0 commit comments

Comments
 (0)