add kEntryRangeDeletion

Summary:
When there are many range deletions in a range, we want to trigger manual compaction on this range to reclaim disk space as soon as possible and speed up read.
After this change, we can collect informations of range deletions and store them into user properties which can guide our manual compaction.
Closes https://github.com/facebook/rocksdb/pull/3695

Differential Revision: D7570322

Pulled By: ajkr

fbshipit-source-id: c358fa43b0aac6cc954d2eadc7d3bd8015373369
main
zhangjinpeng1987 7 years ago committed by Facebook Github Bot
parent 1f5457ef21
commit 31ee4bf240
  1. 2
      db/dbformat.cc
  2. 1
      include/rocksdb/types.h

@ -46,6 +46,8 @@ EntryType GetEntryType(ValueType value_type) {
return kEntrySingleDelete; return kEntrySingleDelete;
case kTypeMerge: case kTypeMerge:
return kEntryMerge; return kEntryMerge;
case kTypeRangeDeletion:
return kEntryRangeDeletion;
default: default:
return kEntryOther; return kEntryOther;
} }

@ -22,6 +22,7 @@ enum EntryType {
kEntryDelete, kEntryDelete,
kEntrySingleDelete, kEntrySingleDelete,
kEntryMerge, kEntryMerge,
kEntryRangeDeletion,
kEntryOther, kEntryOther,
}; };

Loading…
Cancel
Save