• 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
src.mk 19.6 KB