rocksdb/utilities/transactions
reid horuff 6f71d3b68b Improve perf of Pessimistic Transaction expirations (and optimistic transactions)
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
2016-02-05 10:44:13 -08:00
..
optimistic_transaction_db_impl.cc Pessimistic Transactions 2015-08-11 17:52:23 -07:00
optimistic_transaction_db_impl.h Pessimistic Transactions 2015-08-11 17:52:23 -07:00
optimistic_transaction_impl.cc transaction allocation perf improvements 2016-01-28 17:32:28 -08:00
optimistic_transaction_impl.h Improve perf of Pessimistic Transaction expirations (and optimistic transactions) 2016-02-05 10:44:13 -08:00
optimistic_transaction_test.cc Transaction stats 2015-09-09 13:35:53 -07:00
transaction_base.cc transaction allocation perf improvements 2016-01-28 17:32:28 -08:00
transaction_base.h transaction allocation perf improvements 2016-01-28 17:32:28 -08:00
transaction_db_impl.cc Removing data race from expirable transactions 2016-02-02 18:37:44 -08:00
transaction_db_impl.h Removing data race from expirable transactions 2016-02-02 18:37:44 -08:00
transaction_db_mutex_impl.cc Do not use timed_mutex in TransactionDB 2015-12-18 17:26:02 -08:00
transaction_db_mutex_impl.h TransactionDB Custom Locking API 2015-09-08 17:03:57 -07:00
transaction_impl.cc Removing data race from expirable transactions 2016-02-02 18:37:44 -08:00
transaction_impl.h Improve perf of Pessimistic Transaction expirations (and optimistic transactions) 2016-02-05 10:44:13 -08:00
transaction_lock_mgr.cc Removing data race from expirable transactions 2016-02-02 18:37:44 -08:00
transaction_lock_mgr.h Removing data race from expirable transactions 2016-02-02 18:37:44 -08:00
transaction_test.cc Removing data race from expirable transactions 2016-02-02 18:37:44 -08:00
transaction_util.cc Use SST files for Transaction conflict detection 2015-12-11 12:34:11 -08:00
transaction_util.h Use SST files for Transaction conflict detection 2015-12-11 12:34:11 -08:00