-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve Retry Logic #61
Comments
Currently, we can retry n number of times. Per my understanding, this change would mean only being able to retry each record twice. This seems less flexible, but I do agree if there's a problem with one record in a batch it will eventually force us to drop all records in that batch. Implementation suggestions:
I'm also worried individual/smaller batches of inserts after a failure will greatly slow down the database at a time when it may already be under load which is causing the failures. |
I like the idea of wrapping the object in an envelope to limit how many times a record can be retried. I feel like the potential slow down is a necessary evil to have a higher success rate of getting events into the database. |
I'm good with some slowdown (with the retry batch size is a configurable value), but I don't think the last attempt should be inserting one record at a time. This could also make it harder and take longer to recover from an issue. |
This would involve moving batchInserter logic from svalinn into the database, combining the retryer and the batcher. |
After further discussion, we agreed on making the time to wait between retries exponential and to move the batchInserter from svalinn to codex. The retryer and batchInserter are still separate. |
Currently, when an insert fails with n number of records. The exact same query will be rejected.
To improve upon this I recommend having a retry channel where records get added upon to try again in a batch and as a last result do an insert one record at a time.
The text was updated successfully, but these errors were encountered: