6f71d3b68b
Summary: copy from task 8196669: 1) Optimistic transactions do not support batching writes from different threads. 2) Pessimistic transactions do not support batching writes if an expiration time is set. In these 2 cases, we currently do not do any write batching in DBImpl::WriteImpl() because there is a WriteCallback that could decide at the last minute to abort the write. But we could support batching write operations with callbacks if we make sure to process the callbacks correctly. To do this, we would first need to modify write_thread.cc to stop preventing writes with callbacks from being batched together. Then we would need to change DBImpl::WriteImpl() to call all WriteCallback's in a batch, only write the batches that succeed, and correctly set the state of each batch's WriteThread::Writer. Test Plan: Added test WriteWithCallbackTest to write_callback_test.cc which creates multiple client threads and verifies that writes are batched and executed properly. Reviewers: hermanlee4, anthony, ngbronson Subscribers: leveldb, dhruba Differential Revision: https://reviews.facebook.net/D52863 |
||
---|---|---|
.. | ||
backupable | ||
checkpoint | ||
compaction_filters | ||
convenience | ||
document | ||
flashcache | ||
geodb | ||
leveldb_options | ||
memory | ||
merge_operators | ||
options | ||
redis | ||
spatialdb | ||
table_properties_collectors | ||
transactions | ||
ttl | ||
write_batch_with_index | ||
env_mirror_test.cc | ||
env_mirror.cc | ||
merge_operators.h |