gotosocial/internal
kim 5f3e095717
[performance] retry db queries on busy errors (#2025)
* catch SQLITE_BUSY errors, wrap bun.DB to use our own busy retrier, remove unnecessary db.Error type

Signed-off-by: kim <grufwub@gmail.com>

* remove dead code

Signed-off-by: kim <grufwub@gmail.com>

* remove more dead code, add missing error arguments

Signed-off-by: kim <grufwub@gmail.com>

* update sqlite to use maxOpenConns()

Signed-off-by: kim <grufwub@gmail.com>

* add uncommitted changes

Signed-off-by: kim <grufwub@gmail.com>

* use direct calls-through for the ConnIface to make sure we don't double query hook

Signed-off-by: kim <grufwub@gmail.com>

* expose underlying bun.DB better

Signed-off-by: kim <grufwub@gmail.com>

* retry on the correct busy error

Signed-off-by: kim <grufwub@gmail.com>

* use longer possible maxRetries for db retry-backoff

Signed-off-by: kim <grufwub@gmail.com>

* remove the note regarding max-open-conns only applying to postgres

Signed-off-by: kim <grufwub@gmail.com>

* improved code commenting

Signed-off-by: kim <grufwub@gmail.com>

* remove unnecessary infof call (just use info)

Signed-off-by: kim <grufwub@gmail.com>

* rename DBConn to WrappedDB to better follow sql package name conventions

Signed-off-by: kim <grufwub@gmail.com>

* update test error string checks

Signed-off-by: kim <grufwub@gmail.com>

* shush linter

Signed-off-by: kim <grufwub@gmail.com>

* update backoff logic to be more transparent

Signed-off-by: kim <grufwub@gmail.com>

---------

Signed-off-by: kim <grufwub@gmail.com>
2023-07-25 10:34:05 +02:00
..
ap [bugfix] Use gtserror package for WrongType errs (#1930) 2023-06-27 11:37:42 +02:00
api [chore] Admin CLI + new account creation refactoring (#2008) 2023-07-23 12:33:17 +02:00
cache [bugfix] more robust list timeline invalidation (#1995) 2023-07-18 09:43:17 +01:00
cleaner [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
config [feature] Report Masto version in /api/v1/instance (#1977) 2023-07-21 18:49:13 +01:00
db [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
email [bugfix] add From to email header (#1717) 2023-04-29 11:47:14 +02:00
federation [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
gotosocial [chore] Update versions, fix lint errors (#1860) 2023-06-03 13:58:57 +02:00
gtscontext [bugfix/chore] oauth entropy fix + media cleanup tasks rewrite (#1853) 2023-06-22 20:46:36 +01:00
gtserror [bugfix] Use gtserror package for WrongType errs (#1930) 2023-06-27 11:37:42 +02:00
gtsmodel [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
httpclient [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
id [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
iotools [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
log [chore] tidy up media manager, add calling func to errors, build-script improvements (#1835) 2023-05-28 14:08:35 +02:00
media [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
messages [feature] Enable federation in/out of profile PropertyValue fields (#1722) 2023-05-09 11:16:10 +01:00
middleware [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
oauth [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
oidc [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
processing [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
regexes [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
router [frontend] Profiles with fields & more (#1764) 2023-05-11 17:46:32 +02:00
state [feature] Add List functionality (#1802) 2023-05-25 10:37:38 +02:00
storage [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
stream [feature] Add List functionality (#1802) 2023-05-25 10:37:38 +02:00
text [feature] Enable federation in/out of profile PropertyValue fields (#1722) 2023-05-09 11:16:10 +01:00
timeline [bugfix] Add missing continue statement in prepareXBetweenIDs (#1996) 2023-07-18 09:39:16 +01:00
tracing feat: initial tracing support (#1623) 2023-05-09 18:19:48 +01:00
trans [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
transport [chore] Disable the right webfinger test (#2018) 2023-07-23 16:33:16 +02:00
typeutils [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
uris [bugfix] Punycode fixes (#1743) 2023-05-07 18:53:21 +01:00
util [chore] Refactor AP authentication, other small bits of tidying up (#1874) 2023-06-13 15:47:56 +01:00
validate [chore] Admin CLI + new account creation refactoring (#2008) 2023-07-23 12:33:17 +02:00
visibility [bugfix] Fix single author threads not appearing in home timeline (#1679) 2023-04-08 12:56:55 +02:00
web [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
workers [performance] improved request batching (removes need for queueing) (#1687) 2023-04-28 17:45:21 +02:00