Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
kvs: re-work kvs.sync #2016
The last vestige of watch in
Instead, I created a new internal lib called "kvssync", that is a very simplified version of the former "watchlist" just for
I saw a 85.71% diff coverage, woo-hoo! Only notable diff coverage miss was I didn't test two kvs.sync requests with the same version number being waited on (it's a miss in the sort comparison).
Added a dumb unit test to cover that path. Rebased & re-pushed.
As kvs watchers no longer exist in the kvs module, remove the old kvs watchlist code that still existed due to its use within kvs.sync. Replace the kvs.sync mechanism with a new internal lib called "kvssync" that implements a very simple sync mechanism. All sync-waiters are added to a sorted list on kvsroot. When a setroot() has occurred, responses are only sent to those waiters at the front of the list.
@@ Coverage Diff @@ ## master #2016 +/- ## ========================================== + Coverage 80.53% 80.57% +0.04% ========================================== Files 178 179 +1 Lines 28727 28779 +52 ========================================== + Hits 23135 23189 +54 + Misses 5592 5590 -2