Repository navigation
Conversation
674c403 to
26b90e7
Compare
26b90e7 to
23a1e9a
Compare
| return false, err | ||
| } | ||
|
|
||
| if len(messages) > 0 || len(persistedVerifications) > 0 { |
There was a problem hiding this comment.
Previously a late verification for a TIMEOUT message re-entered the worker via the discovery channel, and SUCCESS could overwrite TIMEOUT. Now the insert is ON CONFLICT DO NOTHING and nothing requeues, so it can never be retried?. Is that intended?
There was a problem hiding this comment.
Previously a late verification for a TIMEOUT message re-entered the worker via the discovery channel
I am not sure if this is something we counted on for retry. The discovery channel use multiple source but they are all supposed to give the same messages for the same ccv and within a very short window (way shorter than the actual timeout of a message). In practice I don't think this would have ever retried a worker round.
Let me know if you agree I might be misunderstand the comment
b6dd96e to
5473790
Compare
Run the worker pool on every replica. Each replica claims due PROCESSING rows from indexer.messages, runs the task and settles the row with the claim token. A retry waits for the backoff delay in the database, and the database sets TIMEOUT when the next attempt starts after the deadline. The leader times out expired rows in its own loop and records indexer_worker_queue_size. Discovery no longer sends verifications on a channel. It writes the messages with their trace parent, and the commit wakes the local pool. The worker span is a child of the discovery span. Remove the in-memory scheduler, the heap, the hydrate, WithOnElected and GetProcessingMessages. Add [Pool] PollInterval. Deprecate TickerInterval, MaxHeapSize, HydrationBatchSize and the discovery channel size gauge. A crash or a leader change no longer loses the retry state, and two replicas no longer work on the same message at the same time.
5473790 to
69a9034
Compare
|
Code coverage report:
Files removed (from
Files added (in
|
Run the worker pool on every replica. Each replica claims due PROCESSING rows from indexer.messages, runs the task and settles the row with the claim token. A retry waits for the backoff delay in the database, and the database sets TIMEOUT when the next attempt starts after the deadline. The leader times out expired rows in its own loop and records indexer_worker_queue_size.
Discovery no longer sends verifications on a channel. It writes the messages with their trace parent, and the commit wakes the local pool. The worker span is a child of the discovery span.
Remove the in-memory scheduler, the heap, the hydrate, WithOnElected and GetProcessingMessages. Add [Pool] PollInterval. Deprecate TickerInterval, MaxHeapSize, HydrationBatchSize and the discovery channel size gauge.
A crash or a leader change no longer loses the retry state, and two replicas no longer work on the same message at the same time.