Ver código fonte

添加合并逻辑-朱陈媛

main
朱陈媛 3 semanas atrás
pai
commit
7acbdab58b
1 arquivos alterados com 2 adições e 2 exclusões
  1. +2
    -2
      leveldb_base/db/write_batch.cc

+ 2
- 2
leveldb_base/db/write_batch.cc Ver arquivo

@ -20,7 +20,7 @@
#include "db/write_batch_internal.h"
#include "leveldb/db.h"
#include "util/coding.h"
// 添加所需头文件-
// 添加所需头文件-朱陈媛
#include <sstream>
#include <iomanip>
#include <ctime>
@ -105,7 +105,7 @@ void WriteBatch::Put(const Slice& key, const Slice& value) {
PutLengthPrefixedSlice(&rep_, key);
PutLengthPrefixedSlice(&rep_, value);
}
// 添加ttl,新的put方法-
// 添加ttl,新的put方法-朱陈媛
void WriteBatch::Put(const Slice& key, const Slice& value, uint64_t ttl) {
WriteBatchInternal::SetCount(this, WriteBatchInternal::Count(this) + 1);
rep_.push_back(static_cast<char>(kTypeValue));

Carregando…
Cancelar
Salvar