ironic/releasenotes/notes/add-sqlite-db-retries-f493d5d7aa6db78b.yaml
Sharpz7 949387bd80 [codespell] Fixing Spelling Mistakes
This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.

Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: Id328ff64c352e85b58181e9d9e35973a8706ab7a
2024-02-12 19:58:56 +00:00

26 lines
1.3 KiB
YAML

---
fixes:
- |
Adds a database write retry decorate for SQLite failures reporting
"database is locked". By default, through the new configuration
parameter ``[database]sqlite_max_wait_for_retry``, retries will
be performed on failing write operations for up to *30* seconds.
This value can be tuned, but be warned it is an expotential
backoff retry model, and HTTP requests can give up if no
response is received in a reasonable time, thus *30* seconds
was deemed a reasonable default.
The retry logic can be disabled using the
``[database]sqlite_retries`` option, which defaults to
*True*. Users of other, multi-threaded/concurrent-write database
platforms are not impacted by this change, as the retry logic
recognizes if another database is in use and bypasses the retry
logic in that case. A similar retry logic concept already exists
with other databases in the form of a "Database Deadlock" retry
where two writers conflict on the same row or table. The database
abstraction layer already handles such deadlock conditions.
The SQLite file based locking issue is unfortunately more common
with file based write locking as the entire file, in other words
the entire database, to perform the write operation.