Prevent Workhorse keywatcher GET cancellation race

What does this MR do and why?

Contributes to gitlab-org/quality/engineering-productivity/master-broken-incidents#28427 (closed)

Problem

Cancelling a KeyWatcher#WatchKey request can interrupt the Redis GET before subscription cleanup completes. This leaves the keywatcher subscription active and can report the cancellation as a Redis error.

Solution

  • Keep subscription cleanup running with a bounded context after request cancellation.
  • Treat Redis GET errors caused by request cancellation as no change.
  • Wait for the Redis subscription to become active before cancelling it in the context-cancellation test.

References

gitlab-org/quality/engineering-productivity/master-broken-incidents#28427 (closed)

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist.

Merge request reports

Loading
Loading