You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
150187: gossip: fix pending callbacks not dropping to zero r=iskettaneh a=iskettaneh
We have seen cases before where there was an issue with the pending callbacks metric that it's stuck at some non-zero number. This commit fixes that by:
1) If the infoStore stopper() is quiescing, we should not add more items to the work queue, because they could not be processed, and the pending callbacks metrics won't get decremented.
2) Only increment the pending callbacks metric when we actually add items to the work queue, and not before. Otherwise, there could be a race condition where we increment the pending callbacks metric, and then the infostore Stopper gets quiesced before we added any items to the work queue. This means that we won't decrement the pending callbacks metric.
3) When the callback gets cancelled, or when the infostore stopper gets quiesced, we decrement the pending callbacks metric by the number of items in the work queue. Otherwise, we might not decrement the number of pending callbacks.
Fixes: #147982
Release note: None
Co-authored-by: Ibrahim Kettaneh <[email protected]>
0 commit comments