txnOrdering ensures that serialized requests do not return txn responses with revisions less than the previous returned revision.
| 91 | // txn responses with revisions less than the previous |
| 92 | // returned revision. |
| 93 | type txnOrdering struct { |
| 94 | clientv3.Txn |
| 95 | *kvOrdering |
| 96 | ctx context.Context |
| 97 | mu sync.Mutex |
| 98 | cmps []clientv3.Cmp |
| 99 | thenOps []clientv3.Op |
| 100 | elseOps []clientv3.Op |
| 101 | } |
| 102 | |
| 103 | func (txn *txnOrdering) If(cs ...clientv3.Cmp) clientv3.Txn { |
| 104 | txn.mu.Lock() |
nothing calls this directly
no outgoing calls
no test coverage detected