Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Kvs cleanup error paths #1119
I was in the process of doing a lot of random cleanup (remove oom() calls, remove use of xzmalloc(), etc.) and found a number of circumstances where there were cleanup errors along error/cleanup
17d1764 - if RPCs are already in flight when an error occurs, stall and let them finish, before returning error to user. This was in older KVS code and I broke it while refactoring.
a41bfed - Way back in commit 0cbeacc, there was a relatively harmless logic error (i.e. had no effect except for possibly a tad less optimal). But with the commit API refactoring, it actually mattered a bit more b/c it complicated some logic. This logic has been corrected. The key is that it is not necessary to wait twice for a dirty cache entry to become flushed. Once is sufficient.
7fb6a41 - This was actually a pretty bad mistake on my part while refactoring. If an error occurred while flushing a list of dirty cache entries, then what do you do with the dirty cache entries that were not flushed? They should be removed from the cache, otherwise they will sit there being dirty forever and un-expireable. It may seem strange that I create both a
@@ Coverage Diff @@ ## master #1119 +/- ## ========================================== - Coverage 77.98% 77.96% -0.03% ========================================== Files 157 157 Lines 25988 26035 +47 ========================================== + Hits 20268 20297 +29 - Misses 5720 5738 +18