fix wrong indentation
Summary: Somehow the indentation was incorrect in this file. The only change in this PR is to get it right again in order to make the code more readable. Please reject if you think it's not worth it. Closes https://github.com/facebook/rocksdb/pull/3504 Differential Revision: D6996011 Pulled By: miasantreble fbshipit-source-id: 060514a3a8c910d34bad795b36eb4d278512b154
This commit is contained in:
parent
ba6ee1f749
commit
6a30b98fdc
@ -491,22 +491,22 @@ void WriteBatchWithIndex::Rep::AddNewEntry(uint32_t column_family_id) {
|
||||
new (mem) WriteBatchIndexEntry(last_entry_offset, column_family_id,
|
||||
key.data() - wb_data.data(), key.size());
|
||||
skip_list.Insert(index_entry);
|
||||
}
|
||||
}
|
||||
|
||||
void WriteBatchWithIndex::Rep::Clear() {
|
||||
void WriteBatchWithIndex::Rep::Clear() {
|
||||
write_batch.Clear();
|
||||
ClearIndex();
|
||||
}
|
||||
}
|
||||
|
||||
void WriteBatchWithIndex::Rep::ClearIndex() {
|
||||
void WriteBatchWithIndex::Rep::ClearIndex() {
|
||||
skip_list.~WriteBatchEntrySkipList();
|
||||
arena.~Arena();
|
||||
new (&arena) Arena();
|
||||
new (&skip_list) WriteBatchEntrySkipList(comparator, &arena);
|
||||
last_entry_offset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Status WriteBatchWithIndex::Rep::ReBuildIndex() {
|
||||
Status WriteBatchWithIndex::Rep::ReBuildIndex() {
|
||||
Status s;
|
||||
|
||||
ClearIndex();
|
||||
@ -570,23 +570,23 @@ void WriteBatchWithIndex::Rep::AddNewEntry(uint32_t column_family_id) {
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
WriteBatchWithIndex::WriteBatchWithIndex(
|
||||
WriteBatchWithIndex::WriteBatchWithIndex(
|
||||
const Comparator* default_index_comparator, size_t reserved_bytes,
|
||||
bool overwrite_key, size_t max_bytes)
|
||||
: rep(new Rep(default_index_comparator, reserved_bytes, max_bytes,
|
||||
overwrite_key)) {}
|
||||
|
||||
WriteBatchWithIndex::~WriteBatchWithIndex() {}
|
||||
WriteBatchWithIndex::~WriteBatchWithIndex() {}
|
||||
|
||||
WriteBatch* WriteBatchWithIndex::GetWriteBatch() { return &rep->write_batch; }
|
||||
WriteBatch* WriteBatchWithIndex::GetWriteBatch() { return &rep->write_batch; }
|
||||
|
||||
bool WriteBatchWithIndex::HasDuplicateKeys() {
|
||||
bool WriteBatchWithIndex::HasDuplicateKeys() {
|
||||
return rep->obsolete_offsets.size() > 0;
|
||||
}
|
||||
}
|
||||
|
||||
WBWIIterator* WriteBatchWithIndex::NewIterator() {
|
||||
WBWIIterator* WriteBatchWithIndex::NewIterator() {
|
||||
return new WBWIIteratorImpl(0, &(rep->skip_list), &rep->write_batch);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user