rocksdb/utilities/transactions
Manuel Ung d655a3aab7 Remove extraneous call to TrackKey (#5173)
Summary:
In `PessimisticTransaction::TryLock`, we were calling `TrackKey` even when assume_tracked=true, which defeats the purpose of assume_tracked. Remove this.

For keys that are already tracked, TrackKey will actually bump some counters (num_reads/num_writes) which are consumed in `TransactionBaseImpl::GetTrackedKeysSinceSavePoint`, and this is used to determine which keys were tracked since the last savepoint. I believe this functionality should still work, since I think the user should not call GetForUpdate/Put(assume_tracked=true) across savepoints, and if they do, they should not expect the Put(assume_tracked=true) to show up as a tracked key in the second savepoint.

This is another 2-3% cpu improvement.
Pull Request resolved: https://github.com/facebook/rocksdb/pull/5173

Differential Revision: D14883809

Pulled By: lth

fbshipit-source-id: 7d09f0772da422384af0519773e310c22b0cbca3
2019-04-12 16:37:12 -07:00
..
optimistic_transaction_db_impl.cc Refactor PessimisticTransaction 2017-08-07 16:12:29 -07:00
optimistic_transaction_db_impl.h Make Optimistic Tx database stackable 2018-04-03 15:28:40 -07:00
optimistic_transaction_test.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
optimistic_transaction.cc Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00
optimistic_transaction.h Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00
pessimistic_transaction_db.cc Set WriteCommitted txn id to commit sequence number (#4565) 2018-10-24 12:21:38 -07:00
pessimistic_transaction_db.h WriteUnPrepared: Implement unprepared batches for transactions (#4104) 2018-07-24 00:13:18 -07:00
pessimistic_transaction.cc Remove extraneous call to TrackKey (#5173) 2019-04-12 16:37:12 -07:00
pessimistic_transaction.h WritePrepared: snapshot should be larger than max_evicted_seq_ (#4886) 2019-01-15 18:11:52 -08:00
snapshot_checker.cc WriteUnPrepared: less virtual in iterator callback (#5049) 2019-04-02 14:47:16 -07:00
transaction_base.cc Reduce copies of LockInfo (#5172) 2019-04-10 15:58:58 -07:00
transaction_base.h Extend Transaction::GetForUpdate with do_validate (#4680) 2018-12-06 17:49:00 -08:00
transaction_db_mutex_impl.cc Apply modernize-use-override (2nd iteration) 2019-02-14 14:41:36 -08:00
transaction_db_mutex_impl.h Change RocksDB License 2017-07-15 16:11:23 -07:00
transaction_lock_mgr.cc Reduce copies of LockInfo (#5172) 2019-04-10 15:58:58 -07:00
transaction_lock_mgr.h Reduce copies of LockInfo (#5172) 2019-04-10 15:58:58 -07:00
transaction_test.cc WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00
transaction_test.h WritePrepared: Improve stress tests with slow threads (#4974) 2019-02-19 16:56:49 -08:00
transaction_util.cc WritePrepared: fix ValidateSnapshot with long-running txn (#4961) 2019-02-08 18:01:25 -08:00
transaction_util.h WritePrepared: fix ValidateSnapshot with long-running txn (#4961) 2019-02-08 18:01:25 -08:00
write_prepared_transaction_test.cc WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00
write_prepared_txn_db.cc WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00
write_prepared_txn_db.h WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00
write_prepared_txn.cc WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00
write_prepared_txn.h WriteUnPrepared: less virtual in iterator callback (#5049) 2019-04-02 14:47:16 -07:00
write_unprepared_transaction_test.cc WriteUnPrepared: less virtual in iterator callback (#5049) 2019-04-02 14:47:16 -07:00
write_unprepared_txn_db.cc WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00
write_unprepared_txn_db.h Mark logs with prepare in PreReleaseCallback (#5121) 2019-04-02 15:17:47 -07:00
write_unprepared_txn.cc WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00
write_unprepared_txn.h WritePrepared: fix race condition in reading batch with duplicate keys (#5147) 2019-04-12 14:40:41 -07:00