Home
last modified time | relevance | path

Searched refs:batch (Results 1 – 16 of 16) sorted by relevance

/leveldb-1.20/db/
H A Dwrite_batch_internal.h20 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 Dwrite_batch_test.cc58 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 Dcorruption_test.cc72 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 Ddumpfile.cc104 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 Ddb_impl.cc43 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 Drecovery_test.cc145 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 Ddb_bench.cc752 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 Drepair.cc199 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 Dfault_injection_test.cc396 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 Dc.cc192 leveldb_writebatch_t* batch, in leveldb_write() argument
194 SaveError(errptr, db->rep->Write(options->rep, &batch->rep)); in leveldb_write()
H A Ddb_test.cc1900 virtual Status Write(const WriteOptions& options, WriteBatch* batch) { in Write() argument
1913 return batch->Iterate(&handler); in Write()
/leveldb-1.20/issues/
H A Dissue178_test.cc45 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 Dtable_test.cc367 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 Dc.h95 leveldb_writebatch_t* batch,
/leveldb-1.20/doc/
H A Dindex.md80 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 DREADME.md12 * Multiple changes can be made in one atomic batch.