1. 12 11月, 2017 1 次提交
  2. 07 10月, 2017 1 次提交
  3. 28 9月, 2017 1 次提交
  4. 24 8月, 2017 1 次提交
    • M
      Use PinnableSlice in Transactions · ccf7f833
      Maysam Yabandeh 提交于
      Summary:
      The ::Get from DB is not augmented with an overload method that takes a PinnableSlice instead of a string. Transactions however are not yet upgraded to use the new API. As a result, transaction users such as MyRocks cannot benefit from it. This patch updates the transactional API with a PinnableSlice overload.
      Closes https://github.com/facebook/rocksdb/pull/2736
      
      Differential Revision: D5645770
      
      Pulled By: maysamyabandeh
      
      fbshipit-source-id: f6af520df902f842de1bcf99bed3e8dfc43ad96d
      ccf7f833
  5. 16 7月, 2017 1 次提交
  6. 11 4月, 2017 2 次提交
    • M
      Fix shared lock upgrades · 9300ef54
      Manuel Ung 提交于
      Summary:
      Upgrading a shared lock was silently succeeding because the actual locking code was skipped. This is because if the keys are tracked, it is assumed that they are already locked and do not require locking. Fix this by recording in tracked keys whether the key was locked exclusively or not.
      
      Note that lock downgrades are impossible, which is the behaviour we expect.
      
      This fixes facebook/mysql-5.6#587.
      Closes https://github.com/facebook/rocksdb/pull/2122
      
      Differential Revision: D4861489
      
      Pulled By: IslamAbdelRahman
      
      fbshipit-source-id: 58c7ebe7af098bf01b9774b666d3e9867747d8fd
      9300ef54
    • M
      Limit maximum memory used in the WriteBatch representation · 1f8b119e
      Manuel Ung 提交于
      Summary:
      Extend TransactionOptions to include max_write_batch_size which determines the maximum size of the writebatch representation. If memory limit is exceeded, the operation will abort with subcode kMemoryLimit.
      Closes https://github.com/facebook/rocksdb/pull/2124
      
      Differential Revision: D4861842
      
      Pulled By: lth
      
      fbshipit-source-id: 46fd172ea67cc90bbba829bf0d70cfab2261c161
      1f8b119e
  7. 06 12月, 2016 1 次提交
    • M
      Implement non-exclusive locks · 2005c88a
      Manuel Ung 提交于
      Summary:
      This is an implementation of non-exclusive locks for pessimistic transactions. It is relatively simple and does not prevent starvation (ie. it's possible that request for exclusive access will never be granted if there are always threads holding shared access). It is done by changing `KeyLockInfo` to hold an set a transaction ids, instead of just one, and adding a flag specifying whether this lock is currently held with exclusive access or not.
      
      Some implementation notes:
      - Some lock diagnostic functions had to be updated to return a set of transaction ids for a given lock, eg. `GetWaitingTxn` and `GetLockStatusData`.
      - Deadlock detection is a bit more complicated since a transaction can now wait on multiple other transactions. A BFS is done in this case, and deadlock detection depth is now just a limit on the number of transactions we visit.
      - Expirable transactions do not work efficiently with shared locks at the moment, but that's okay for now.
      Closes https://github.com/facebook/rocksdb/pull/1573
      
      Differential Revision: D4239097
      
      Pulled By: lth
      
      fbshipit-source-id: da7c074
      2005c88a
  8. 11 5月, 2016 1 次提交
  9. 08 3月, 2016 1 次提交
  10. 01 3月, 2016 1 次提交
    • A
      TransactionDB:ReinitializeTransaction · 5ea9aa3c
      agiardullo 提交于
      Summary: Add function to reinitialize a transaction object so that it can be reused.  This is an optimization so users can potentially avoid reallocating transaction objects.
      
      Test Plan: added tests
      
      Reviewers: yhchiang, kradhakrishnan, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: jkedgar, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D53835
      5ea9aa3c
  11. 17 2月, 2016 1 次提交
  12. 10 2月, 2016 2 次提交
    • B
      Updated all copyright headers to the new format. · 21e95811
      Baraa Hamodi 提交于
      21e95811
    • A
      Transaction::UndoGetForUpdate · fe93bf9b
      agiardullo 提交于
      Summary: MyRocks wants to be able to un-lock a key that was just locked by GetForUpdate().  To do this safely, I am now keeping track of the number of reads(for update) and writes for each key in a transaction.  UndoGetForUpdate() will only unlock a key if it hasn't been written and the read count reaches 0.
      
      Test Plan: more unit tests
      
      Reviewers: igor, rven, yhchiang, spetrunia, sdong
      
      Reviewed By: spetrunia, sdong
      
      Subscribers: spetrunia, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47043
      fe93bf9b
  13. 29 1月, 2016 1 次提交
  14. 09 12月, 2015 2 次提交
  15. 08 12月, 2015 1 次提交
    • A
      Support marking snapshots for write-conflict checking · ec704aaf
      agiardullo 提交于
      Summary:
      D50475 enables using SST files for transaction write-conflict checking.  In order for this to work, we need to make sure not to compact out SingleDeletes when there is an earlier transaction snapshot(D50295).  If there is a long-held snapshot, this could reduce the benefit of the SingleDelete optimization.
      
      This diff allows Transactions to mark snapshots as being used for write-conflict checking.  Then, during compaction, we will be able to optimize SingleDeletes better in the future.
      
      This diff adds a flag to SnapshotImpl which is used by Transactions.  This diff also passes the earliest write-conflict snapshot's sequence number to CompactionIterator.  This diff does not actually change Compaction (after this diff is pushed, D50295 will be able to use this information).
      
      Test Plan: no behavior change, ran existing tests
      
      Reviewers: rven, kradhakrishnan, yhchiang, IslamAbdelRahman, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D51183
      ec704aaf
  16. 05 12月, 2015 1 次提交
    • J
      Added callback notification when a snapshot is created · b28b7c6d
      Jay Edgar 提交于
      Summary: When SetSnapshot() is used the caller immediately knows a snapshot has been created, but when SetSnapshotOnNextOperation() is used the caller needs a way to get notified when that snapshot has been generated.  This creates an interface that the client can implement that will be called at the time the snapshot is created.
      
      Test Plan: Added a new SetSnapshotOnNextOperationWithNotification test into the transaction_test.
      
      Reviewers: sdong, anthony
      
      Reviewed By: anthony
      
      Subscribers: yoshinorim, leveldb, dhruba
      
      Differential Revision: https://reviews.facebook.net/D51177
      b28b7c6d
  17. 10 10月, 2015 2 次提交
    • A
      Deferred snapshot creation in transactions · def74f87
      agiardullo 提交于
      Summary: Support for Transaction::CreateSnapshotOnNextOperation().  This is to fix a write-conflict race-condition that Yoshinori was running into when testing MyRocks with LinkBench.
      
      Test Plan: New tests
      
      Reviewers: yhchiang, spetrunia, rven, igor, yoshinorim, sdong
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48099
      def74f87
    • A
      DisableIndexing() for Transactions · c5f3707d
      agiardullo 提交于
      Summary:
      MyRocks reported some perfomance issues when inserting many keys into a transaction due to the cost of inserting new keys into WriteBatchWithIndex.  Frequently, they don't even need the keys to be indexed as they don't need to read them back.  DisableIndexing() can be used to avoid the cost of indexing.
      
      I also plan on eventually investigating if we can improve WriteBatchWithIndex performance.  But even if we improved the perf here, it is still beneficial to be able to disable the indexing all together for large transactions.
      
      Test Plan: unit test
      
      Reviewers: igor, rven, yoshinorim, spetrunia, sdong
      
      Reviewed By: sdong
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D48471
      c5f3707d
  18. 30 9月, 2015 1 次提交
  19. 29 9月, 2015 1 次提交
    • A
      SingleDelete support for Transactions · afe0dc53
      agiardullo 提交于
      Summary: Transactional SingleDelete is needed for MyRocks.  Note: This diff requires D47529.
      
      Test Plan: Added some new tests in this diff as well as more tests added in D47529
      
      Reviewers: rven, sdong, igor, yhchiang
      
      Reviewed By: yhchiang
      
      Subscribers: yoshinorim, dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D47535
      afe0dc53
  20. 12 9月, 2015 1 次提交
  21. 10 9月, 2015 1 次提交
    • A
      Transaction stats · aa6eed0c
      agiardullo 提交于
      Summary: Added funtions to fetch the number of locked keys in a transaction, the number of pending puts/merge/deletes, and the elapsed time
      
      Test Plan: unit tests
      
      Reviewers: yoshinorim, jkedgar, rven, sdong, yhchiang, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D45417
      aa6eed0c
  22. 25 8月, 2015 1 次提交
    • A
      Common base class for transactions · 20d1e547
      agiardullo 提交于
      Summary:
      As I keep adding new features to transactions, I keep creating more duplicate code.  This diff cleans this up by creating a base implementation class for Transaction and OptimisticTransaction to inherit from.
      
      The code in TransactionBase.h/.cc is all just copied from elsewhere.  The only entertaining part of this class worth looking at is the virtual TryLock method which allows OptimisticTransactions and Transactions to share the same common code for Put/Get/etc.
      
      The rest of this diff is mostly red and easy on the eyes.
      
      Test Plan: No functionality change.  existing tests pass.
      
      Reviewers: sdong, jkedgar, rven, igor
      
      Reviewed By: igor
      
      Subscribers: dhruba, leveldb
      
      Differential Revision: https://reviews.facebook.net/D45135
      20d1e547