Skip to content

Commit 32f0a9c

Browse files
bladepaninikep
authored andcommitted
update rocksdb to 8.1.fb
Summary: update rocksdb to 8.1.fb rocksdb api change causing `io_stalls` properties no long exist. see rocksdb release note > Add new db properties `rocksdb.cf-write-stall-stats`, `rocksdb.db-write-stall-stats`and APIs to examine them in a structured way. In particular, users of `GetMapProperty()` with property `kCFWriteStallStats`/`kDBWriteStallStats` can now use the functions in `WriteStallStatsMapKeys` to find stats in the map. see also facebook/rocksdb#11300. update-submodule: rocksdb Reviewed By: hermanlee Differential Revision: D44687471 fbshipit-source-id: 9b62ed1
1 parent 7df111f commit 32f0a9c

File tree

3 files changed

+42
-24
lines changed

3 files changed

+42
-24
lines changed

mysql-test/suite/rocksdb/r/show_engine.result

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ __system__ TABLE_FACTORY::STRICT_CAPACITY_LIMIT #
173173
__system__ TABLE_FACTORY::MEMORY_ALLOCATOR #
174174
__system__ TABLE_FACTORY::HIGH_PRI_POOL_RATIO #
175175
__system__ TABLE_FACTORY::LOW_PRI_POOL_RATIO #
176-
__system__ TABLE_FACTORY::BLOCK_CACHE_COMPRESSED #
177176
__system__ TABLE_FACTORY::PERSISTENT_CACHE #
178177
__system__ TABLE_FACTORY::BLOCK_SIZE #
179178
__system__ TABLE_FACTORY::BLOCK_SIZE_DEVIATION #
@@ -249,7 +248,6 @@ cf_t1 TABLE_FACTORY::STRICT_CAPACITY_LIMIT #
249248
cf_t1 TABLE_FACTORY::MEMORY_ALLOCATOR #
250249
cf_t1 TABLE_FACTORY::HIGH_PRI_POOL_RATIO #
251250
cf_t1 TABLE_FACTORY::LOW_PRI_POOL_RATIO #
252-
cf_t1 TABLE_FACTORY::BLOCK_CACHE_COMPRESSED #
253251
cf_t1 TABLE_FACTORY::PERSISTENT_CACHE #
254252
cf_t1 TABLE_FACTORY::BLOCK_SIZE #
255253
cf_t1 TABLE_FACTORY::BLOCK_SIZE_DEVIATION #
@@ -325,7 +323,6 @@ default TABLE_FACTORY::STRICT_CAPACITY_LIMIT #
325323
default TABLE_FACTORY::MEMORY_ALLOCATOR #
326324
default TABLE_FACTORY::HIGH_PRI_POOL_RATIO #
327325
default TABLE_FACTORY::LOW_PRI_POOL_RATIO #
328-
default TABLE_FACTORY::BLOCK_CACHE_COMPRESSED #
329326
default TABLE_FACTORY::PERSISTENT_CACHE #
330327
default TABLE_FACTORY::BLOCK_SIZE #
331328
default TABLE_FACTORY::BLOCK_SIZE_DEVIATION #
@@ -401,7 +398,6 @@ rev:cf_t2 TABLE_FACTORY::STRICT_CAPACITY_LIMIT #
401398
rev:cf_t2 TABLE_FACTORY::MEMORY_ALLOCATOR #
402399
rev:cf_t2 TABLE_FACTORY::HIGH_PRI_POOL_RATIO #
403400
rev:cf_t2 TABLE_FACTORY::LOW_PRI_POOL_RATIO #
404-
rev:cf_t2 TABLE_FACTORY::BLOCK_CACHE_COMPRESSED #
405401
rev:cf_t2 TABLE_FACTORY::PERSISTENT_CACHE #
406402
rev:cf_t2 TABLE_FACTORY::BLOCK_SIZE #
407403
rev:cf_t2 TABLE_FACTORY::BLOCK_SIZE_DEVIATION #

rocksdb

Submodule rocksdb updated 663 files

storage/rocksdb/ha_rocksdb.cc

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14061,10 +14061,9 @@ static int show_myrocks_vars(THD *thd MY_ATTRIBUTE((unused)), SHOW_VAR *var,
1406114061
return 0;
1406214062
}
1406314063

14064-
static ulonglong io_stall_prop_value(
14064+
static ulonglong get_prop_value_as_ulong(
1406514065
const std::map<std::string, std::string> &props, const std::string &key) {
14066-
std::map<std::string, std::string>::const_iterator iter =
14067-
props.find("io_stalls." + key);
14066+
std::map<std::string, std::string>::const_iterator iter = props.find(key);
1406814067
if (iter != props.end()) {
1406914068
return std::stoull(iter->second);
1407014069
} else {
@@ -14087,29 +14086,52 @@ static void update_rocksdb_stall_status() {
1408714086
// Retrieve information from valid CF handle object. It is safe
1408814087
// even if the CF is removed from cf_manager at this point.
1408914088
std::map<std::string, std::string> props;
14090-
if (!rdb->GetMapProperty(cfh.get(), "rocksdb.cfstats", &props)) {
14089+
if (!rdb->GetMapProperty(
14090+
cfh.get(), rocksdb::DB::Properties::kCFWriteStallStats, &props)) {
1409114091
continue;
1409214092
}
1409314093

14094-
local_io_stall_stats.level0_slowdown +=
14095-
io_stall_prop_value(props, "level0_slowdown");
14094+
using rocksdb::WriteStallCause;
14095+
using rocksdb::WriteStallCondition;
14096+
using rocksdb::WriteStallStatsMapKeys;
14097+
local_io_stall_stats.level0_slowdown += get_prop_value_as_ulong(
14098+
props,
14099+
WriteStallStatsMapKeys::CauseConditionCount(
14100+
WriteStallCause::kL0FileCountLimit, WriteStallCondition::kDelayed));
1409614101
local_io_stall_stats.level0_slowdown_with_compaction +=
14097-
io_stall_prop_value(props, "level0_slowdown_with_compaction");
14098-
local_io_stall_stats.level0_numfiles +=
14099-
io_stall_prop_value(props, "level0_numfiles");
14100-
local_io_stall_stats.level0_numfiles_with_compaction +=
14101-
io_stall_prop_value(props, "level0_numfiles_with_compaction");
14102+
get_prop_value_as_ulong(
14103+
props, WriteStallStatsMapKeys::
14104+
CFL0FileCountLimitDelaysWithOngoingCompaction());
14105+
local_io_stall_stats.level0_numfiles += get_prop_value_as_ulong(
14106+
props,
14107+
WriteStallStatsMapKeys::CauseConditionCount(
14108+
WriteStallCause::kL0FileCountLimit, WriteStallCondition::kStopped));
14109+
local_io_stall_stats
14110+
.level0_numfiles_with_compaction += get_prop_value_as_ulong(
14111+
props,
14112+
WriteStallStatsMapKeys::CFL0FileCountLimitStopsWithOngoingCompaction());
1410214113
local_io_stall_stats.stop_for_pending_compaction_bytes +=
14103-
io_stall_prop_value(props, "stop_for_pending_compaction_bytes");
14114+
get_prop_value_as_ulong(props,
14115+
WriteStallStatsMapKeys::CauseConditionCount(
14116+
WriteStallCause::kPendingCompactionBytes,
14117+
WriteStallCondition::kStopped));
1410414118
local_io_stall_stats.slowdown_for_pending_compaction_bytes +=
14105-
io_stall_prop_value(props, "slowdown_for_pending_compaction_bytes");
14106-
local_io_stall_stats.memtable_compaction +=
14107-
io_stall_prop_value(props, "memtable_compaction");
14108-
local_io_stall_stats.memtable_slowdown +=
14109-
io_stall_prop_value(props, "memtable_slowdown");
14110-
local_io_stall_stats.total_stop += io_stall_prop_value(props, "total_stop");
14119+
get_prop_value_as_ulong(props,
14120+
WriteStallStatsMapKeys::CauseConditionCount(
14121+
WriteStallCause::kPendingCompactionBytes,
14122+
WriteStallCondition::kDelayed));
14123+
local_io_stall_stats.memtable_compaction += get_prop_value_as_ulong(
14124+
props,
14125+
WriteStallStatsMapKeys::CauseConditionCount(
14126+
WriteStallCause::kMemtableLimit, WriteStallCondition::kStopped));
14127+
local_io_stall_stats.memtable_slowdown += get_prop_value_as_ulong(
14128+
props,
14129+
WriteStallStatsMapKeys::CauseConditionCount(
14130+
WriteStallCause::kMemtableLimit, WriteStallCondition::kDelayed));
14131+
local_io_stall_stats.total_stop +=
14132+
get_prop_value_as_ulong(props, WriteStallStatsMapKeys::TotalStops());
1411114133
local_io_stall_stats.total_slowdown +=
14112-
io_stall_prop_value(props, "total_slowdown");
14134+
get_prop_value_as_ulong(props, WriteStallStatsMapKeys::TotalDelays());
1411314135
}
1411414136
io_stall_stats = local_io_stall_stats;
1411514137
}

0 commit comments

Comments
 (0)