website
website copied to clipboard
Documentation Regarding Retry Functionality
Issue Creation Checklist
[X] I have read the contribution guidelines
Issue Description
I have been running through many github project issues and through a few google search results to try and understand how to enable Retry logic with sequelize and what its capabilities are and wether it works with transactions. This isn't officially documented anywhere and there is a lot of confusion around this without clear answers.
What was unclear/insufficient/not covered in the documentation
Everything around the retry option in sequelize is kind of a mystery.
- Is something Like this still valid?
- what are the limitations?
- Does this retry transactions if they fail?
- Does this retry individual queries?
retry: {
match: [
Sequelize.ConnectionError,
Sequelize.ConnectionTimedOutError,
Sequelize.TimeoutError,
/Deadlock/i,
'SQLITE_BUSY'],
max: 3
}
If possible: Provide some suggestion on how we can enhance the docs
Would be nice to have a section on retry capabilities in the documentation, how it works and what are its limitations are.
Additional context
List of resources I was able to dig up regarding this question:
- https://dev.to/anonyma/how-to-retry-transactions-in-sequelize-5h5c
- https://github.com/sequelize/sequelize/issues/8294
- https://github.com/sequelize/sequelize/issues/8352
- https://github.com/sequelize/sequelize/issues/10262
Moved to the documentation website as it's where we keep issues related to the documentation.
I can already provide some info, the retry option is passed to this library: https://www.npmjs.com/package/retry-as-promised. I think we just pass them as-is, with default values.