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
{{ message }}
Repository navigation
knowledge/lease: #20614 follow-ups — in-flight source overlap after lease loss, a second _REFRESH_LUA, client factory outside the try #20766
A source in flight when the lease is lost can overlap with the next run.fix(knowledge): one sync at a time per connector, and say when one didn't start (#20556) #20614 stops a sync before its next source once the lease is lost (raise_if_sync_lease_lost). A source already being fetched or ingested finishes after the loss, and a new run that took the expired key can process the same source at the same time. Ingest is keyed by source id, so this is a double write, not a loss. One-sync-per-connector still isn't strict in that window. Options: check ownership again before the ingest write of each source, or make the per-source write conditional on the lease.
LeaderLease._attempt calls get_async_redis_client outside its try. In autobot_shared/leader_lease.py, a client factory that raises, rather than returning None, escapes as an exception instead of the "unknown" (None) result that hold_or_refresh turns into 503 or a retry. Move the call inside the try.
Acceptance criteria
A source in flight at lease loss can't be written by two runs at once, with a test.
One _REFRESH_LUA: outbound_sync uses LeaderLease.
A raising Redis client factory reads as unknown (None) in _attempt, with a test.
Activity