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
job-info: Watcher - cancel lookup on several error paths #2303
I realized in the job-info eventlog watch code, I don't cancel a lookup under several circumstances, such as when the user has a permission issue. So this could lead to a matchtag leak. So added a lookup cancellation call in the error path of some cleanup.
Also includes some random cleanup fixes.
Problem: Under several circumstances, such as when there is a permission issue, the job-info module will respond to the original caller with an error, and then destroy the flux future watching the KVS key. This could lead to a matchtag leak, b/c the lookup is never actually canceled. Solution: In these particular circumstances, send a lookup cancellation before destroying the future.
There is no need to send error responses to caller directly on ENODATA or watch cancellation. Instead just fallthrough to error path via 'goto error', which will send error based on errno value.
@@ Coverage Diff @@ ## master #2303 +/- ## ========================================= - Coverage 80.9% 80.9% -0.01% ========================================= Files 214 214 Lines 33681 33677 -4 ========================================= - Hits 27249 27245 -4 Misses 6432 6432