Set Ai::Messaging::CallbackWorker data_consistency to :sticky

What does this MR do and why?

Ai::Messaging::CallbackWorker is the EventStore subscriber that fires when a Duo agent workflow finishes and delivers the reply back to the user (e.g. for @GitLabDuo MR mentions).

It used data_consistency :delayed, which reschedules the job when the database replicas have not yet caught up to the point at which the job was enqueued — adding latency before the reply is delivered.

This MR switches it to data_consistency :sticky, the preferred option for jobs that should run as fast as possible: replicas are guaranteed to be caught up to the enqueue point, and the job falls back to the primary otherwise — so there is no reschedule delay on replica lag.

Urgency stays :low and worker_has_external_dependencies! is unchanged.

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

References

!238375 (comment 3410516514)

Edited by Kinshuk Singh

Merge request reports

Loading