flux-core
flux-core copied to clipboard
kvs: return ENOSYS on unfinished requests
Problem: When the KVS module is unloaded, any unfinished requests (get, put, wait-version, etc.) should get an ENOSYS response. That is presently not handled.
Solution: Track all requests sent to the kvs module that will not be returned immediately. Upon module exit, respond to all unfinished requests with ENOSYS.
Fixes #5979
note, I noted in #5979 that some other modules might need this fix as well. Could tack onto this PR as well, but thought we'd deal with just this one first since it specifically has been hit.
rebased & re-pushed, removing the move of msg_hash from librouter to libfluxutil.
re-pushed, fixing up things per comments above and adding some extra tests. The only real "gotcha" on the tests is that some "pending_requests" exist in one test at the end, so those are manually counted. This is related to the recently opened #6112
Codecov Report
Attention: Patch coverage is 93.75000% with 3 lines in your changes missing coverage. Please review.
Project coverage is 83.36%. Comparing base (
de5d907) to head (176eea4). Report is 531 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| src/modules/kvs/kvs.c | 93.75% | 3 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #6049 +/- ##
==========================================
- Coverage 83.37% 83.36% -0.01%
==========================================
Files 521 521
Lines 84681 84719 +38
==========================================
+ Hits 70601 70626 +25
- Misses 14080 14093 +13
| Files with missing lines | Coverage Δ | |
|---|---|---|
| src/modules/kvs/kvs.c | 71.87% <93.75%> (+0.51%) |
:arrow_up: |