| /leveldb-1.20/db/ |
| H A D | write_batch_internal.h | 20 static int Count(const WriteBatch* batch); 23 static void SetCount(WriteBatch* batch, int n); 26 static SequenceNumber Sequence(const WriteBatch* batch); 30 static void SetSequence(WriteBatch* batch, SequenceNumber seq); 32 static Slice Contents(const WriteBatch* batch) { in Contents() argument 33 return Slice(batch->rep_); in Contents() 36 static size_t ByteSize(const WriteBatch* batch) { in ByteSize() argument 37 return batch->rep_.size(); in ByteSize() 40 static void SetContents(WriteBatch* batch, const Slice& contents); 42 static Status InsertInto(const WriteBatch* batch, MemTable* memtable);
|
| H A D | write_batch_test.cc | 58 WriteBatch batch; in TEST() local 59 ASSERT_EQ("", PrintContents(&batch)); in TEST() 64 WriteBatch batch; in TEST() local 65 batch.Put(Slice("foo"), Slice("bar")); in TEST() 66 batch.Delete(Slice("box")); in TEST() 67 batch.Put(Slice("baz"), Slice("boo")); in TEST() 74 PrintContents(&batch)); in TEST() 78 WriteBatch batch; in TEST() local 79 batch.Put(Slice("foo"), Slice("bar")); in TEST() 80 batch.Delete(Slice("box")); in TEST() [all …]
|
| H A D | corruption_test.cc | 72 WriteBatch batch; in Build() local 76 batch.Clear(); in Build() 77 batch.Put(key, Value(i, &value_space)); in Build() 84 ASSERT_OK(db_->Write(options, &batch)); in Build() 226 WriteBatch batch; in TEST() local 227 batch.Put("a", Value(100, &value_storage)); in TEST() 228 s = db_->Write(WriteOptions(), &batch); in TEST()
|
| H A D | dumpfile.cc | 104 WriteBatch batch; in WriteBatchPrinter() local 105 WriteBatchInternal::SetContents(&batch, record); in WriteBatchPrinter() 107 AppendNumberTo(&r, WriteBatchInternal::Sequence(&batch)); in WriteBatchPrinter() 112 Status s = batch.Iterate(&batch_item_printer); in WriteBatchPrinter()
|
| H A D | db_impl.cc | 43 WriteBatch* batch; member 410 WriteBatch batch; in RecoverLogFile() local 1196 w.batch = my_batch; in Write() 1295 if (w->batch != NULL) { in BuildBatchGroup() 1303 if (result == first->batch) { in BuildBatchGroup() 1477 WriteBatch batch; in Put() local 1478 batch.Put(key, value); in Put() 1479 return Write(opt, &batch); in Put() 1483 WriteBatch batch; in Delete() local 1484 batch.Delete(key); in Delete() [all …]
|
| H A D | recovery_test.cc | 145 WriteBatch batch; in MakeLogFile() local 146 batch.Put(key, val); in MakeLogFile() 147 WriteBatchInternal::SetSequence(&batch, seq); in MakeLogFile() 148 ASSERT_OK(writer.AddRecord(WriteBatchInternal::Contents(&batch))); in MakeLogFile()
|
| H A D | db_bench.cc | 752 WriteBatch batch; in DoWrite() local 756 batch.Clear(); in DoWrite() 761 batch.Put(key, gen.Generate(value_size_)); in DoWrite() 765 s = db_->Write(write_options_, &batch); in DoWrite() 863 WriteBatch batch; in DoDelete() local 866 batch.Clear(); in DoDelete() 871 batch.Delete(key); in DoDelete() 874 s = db_->Write(write_options_, &batch); in DoDelete()
|
| H A D | repair.cc | 199 WriteBatch batch; in ConvertLogToTable() local 209 WriteBatchInternal::SetContents(&batch, record); in ConvertLogToTable() 210 status = WriteBatchInternal::InsertInto(&batch, mem); in ConvertLogToTable() 212 counter += WriteBatchInternal::Count(&batch); in ConvertLogToTable()
|
| H A D | fault_injection_test.cc | 396 WriteBatch batch; in Build() local 399 batch.Clear(); in Build() 400 batch.Put(key, Value(i, &value_space)); in Build() 402 ASSERT_OK(db_->Write(options, &batch)); in Build()
|
| H A D | c.cc | 192 leveldb_writebatch_t* batch, in leveldb_write() argument 194 SaveError(errptr, db->rep->Write(options->rep, &batch->rep)); in leveldb_write()
|
| H A D | db_test.cc | 1900 virtual Status Write(const WriteOptions& options, WriteBatch* batch) { in Write() argument 1913 return batch->Iterate(&handler); in Write()
|
| /leveldb-1.20/issues/ |
| H A D | issue178_test.cc | 45 leveldb::WriteBatch batch; in TEST() local 47 batch.Put(Key1(i), "value for range 1 key"); in TEST() 49 ASSERT_OK(db->Write(leveldb::WriteOptions(), &batch)); in TEST() 52 batch.Clear(); in TEST() 54 batch.Put(Key2(i), "value for range 2 key"); in TEST() 56 ASSERT_OK(db->Write(leveldb::WriteOptions(), &batch)); in TEST() 59 batch.Clear(); in TEST() 61 batch.Delete(Key2(i)); in TEST() 63 ASSERT_OK(db->Write(leveldb::WriteOptions(), &batch)); in TEST()
|
| /leveldb-1.20/table/ |
| H A D | table_test.cc | 367 WriteBatch batch; in FinishImpl() local 368 batch.Put(it->first, it->second); in FinishImpl() 369 ASSERT_TRUE(db_->Write(WriteOptions(), &batch).ok()); in FinishImpl() 766 WriteBatch batch; in TEST() local 767 WriteBatchInternal::SetSequence(&batch, 100); in TEST() 768 batch.Put(std::string("k1"), std::string("v1")); in TEST() 769 batch.Put(std::string("k2"), std::string("v2")); in TEST() 770 batch.Put(std::string("k3"), std::string("v3")); in TEST() 771 batch.Put(std::string("largekey"), std::string("vlarge")); in TEST() 772 ASSERT_TRUE(WriteBatchInternal::InsertInto(&batch, memtable).ok()); in TEST()
|
| /leveldb-1.20/include/leveldb/ |
| H A D | c.h | 95 leveldb_writebatch_t* batch,
|
| /leveldb-1.20/doc/ |
| H A D | index.md | 80 leveldb::WriteBatch batch; 81 batch.Delete(key1); 82 batch.Put(key2, value); 83 s = db->Write(leveldb::WriteOptions(), &batch); 88 edits within the batch are applied in order. Note that we called Delete before 93 bulk updates by placing lots of individual mutations into the same batch. 129 synchronous write will be amortized across all of the writes in the batch.
|
| /leveldb-1.20/ |
| H A D | README.md | 12 * Multiple changes can be made in one atomic batch.
|