Skip to content

Commit 1d38131

Browse files
yoshinorimGunnar Kudrjavets
authored andcommitted
MyRocks: Fixing stats collection assuming Deletes are rows (issue#100)
Summary: MyRocks statistics assumed all operation types (including Delete, SingleDelete, Merge) as incrementing rows. This diff changes behavior -- incrementing rows for Put only. Test Plan: new test case rocksdb.issue100_delete Reviewers: spetrunia, hermanlee4, jkedgar Reviewed By: jkedgar Subscribers: webscalesql-eng Differential Revision: https://reviews.facebook.net/D51315
1 parent cac3603 commit 1d38131

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

storage/rocksdb/properties_collector.cc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,10 @@ MyRocksTablePropertiesCollector::AddUserKey(
9898
}
9999
auto& stats = stats_.back();
100100
stats.data_size += key.size()+value.size();
101-
stats.rows++;
101+
if (type == rocksdb::kEntryPut)
102+
{
103+
stats.rows++;
104+
}
102105
stats.actual_disk_size += file_size-file_size_;
103106

104107
if (params_.window_ > 0) {

0 commit comments

Comments
 (0)