revision-id: 4ae6cdd9954ad7ee4438785c076c93aa3a67c6ef (percona-202102-58-g4ae6cdd9954) parent(s): e5fb7e43eb90c1bd19570e93b23e56365af42189 author: Sergei Petrunia committer: Sergei Petrunia timestamp: 2021-06-14 22:21:36 +0300 message: Add rocksdb_range_lock_* counters --- rocksdb | 2 +- storage/rocksdb/rdb_perf_context.cc | 6 ++++++ storage/rocksdb/rdb_perf_context.h | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rocksdb b/rocksdb index 0f8c041ea7b..c0a4e59baa6 160000 --- a/rocksdb +++ b/rocksdb @@ -1 +1 @@ -Subproject commit 0f8c041ea7bb458caa5ec0dbeef9fa42d0b97482 +Subproject commit c0a4e59baa6e46f6e80d6ba049058b367c3a5c94 diff --git a/storage/rocksdb/rdb_perf_context.cc b/storage/rocksdb/rdb_perf_context.cc index 12621e5f84f..57d740432f3 100644 --- a/storage/rocksdb/rdb_perf_context.cc +++ b/storage/rocksdb/rdb_perf_context.cc @@ -89,6 +89,9 @@ std::string rdb_pc_stat_types[] = { "BLOOM_SST_MISS_COUNT", "KEY_LOCK_WAIT_TIME", "KEY_LOCK_WAIT_COUNT", + "RANGE_LOCK_LOCKS", + "RANGE_LOCK_UNLOCKS", + "RANGE_LOCK_MUTEX_LOCKS", "IO_THREAD_POOL_ID", "IO_BYTES_WRITTEN", "IO_BYTES_READ", @@ -166,6 +169,9 @@ static void harvest_diffs(Rdb_atomic_perf_counters *const counters) { IO_PERF_RECORD(key_lock_wait_time); IO_PERF_RECORD(key_lock_wait_count); + IO_PERF_RECORD(range_lock_locks); + IO_PERF_RECORD(range_lock_unlocks); + IO_PERF_RECORD(range_lock_mutex_locks); if (rocksdb::get_iostats_context() != nullptr) { IO_STAT_RECORD(thread_pool_id); IO_STAT_RECORD(bytes_written); diff --git a/storage/rocksdb/rdb_perf_context.h b/storage/rocksdb/rdb_perf_context.h index c8718e77a00..917a97f9641 100644 --- a/storage/rocksdb/rdb_perf_context.h +++ b/storage/rocksdb/rdb_perf_context.h @@ -78,6 +78,9 @@ enum { PC_BLOOM_SST_MISS_COUNT, PC_KEY_LOCK_WAIT_TIME, PC_KEY_LOCK_WAIT_COUNT, + PC_RANGE_LOCK_LOCKS, + PC_RANGE_LOCK_UNLOCKS, + PC_RANGE_LOCK_MUTEX_LOCKS, PC_IO_THREAD_POOL_ID, PC_IO_BYTES_WRITTEN, PC_IO_BYTES_READ,