b->content_flags_.store(ContentFlags::DEFERRED, std::memory_order_relaxed);
}
-void WriteBatchInternal::Append(WriteBatch* dst, const WriteBatch* src) {
+void WriteBatchInternal::Append(WriteBatch* dst, WriteBatch* src) {
SetCount(dst, Count(dst) + Count(src));
assert(src->rep_.size() >= WriteBatchInternal::kHeader);
dst->rep_.append(src->rep_.data() + WriteBatchInternal::kHeader,
}
}
+void WriteBatch::Append(WriteBatch& src) {
+ WriteBatchInternal::Append(this, &src);
+}
+
} // namespace rocksdb
uint64_t log_number = 0, DB* db = nullptr,
bool concurrent_memtable_writes = false);
- static void Append(WriteBatch* dst, const WriteBatch* src);
+ static void Append(WriteBatch* dst, WriteBatch* src);
// Returns the byte size of appending a WriteBatch with ByteSize
// leftByteSize and a WriteBatch with ByteSize rightByteSize
void Merge(const Slice& key, const Slice& value) override {
Merge(nullptr, key, value);
}
+ void Append(WriteBatch& src);
// variant that takes SliceParts
void Merge(ColumnFamilyHandle* column_family, const SliceParts& key,