mirror of
1
Fork 0
gotosocial/internal/processing
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
..
account [chore] Admin CLI + new account creation refactoring (#2008) 2023-07-23 12:33:17 +02:00
admin [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
fedi [bugfix] Reorder web view logic, other small fixes (#1954) 2023-07-07 14:58:53 +02:00
list [bugfix] Return all accounts when list accounts limit <= 0 (#2014) 2023-07-21 13:56:38 +01:00
media [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
report [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
search [bugfix/chore] oauth entropy fix + media cleanup tasks rewrite (#1853) 2023-06-22 20:46:36 +01:00
status [bugfix] Invalidate timeline entries for status when stats change (#1879) 2023-06-11 10:18:44 +01:00
stream [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
timeline [bugfix] more robust list timeline invalidation (#1995) 2023-07-18 09:43:17 +01:00
user [chore] Admin CLI + new account creation refactoring (#2008) 2023-07-23 12:33:17 +02:00
account_test.go [bugfix] Fix multiple "updated_at" columns for media updates (#1660) 2023-03-31 15:19:50 +02:00
app.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
blocks.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
followrequest.go [performance] refactoring + add fave / follow / request / visibility caching (#1607) 2023-03-28 14:03:14 +01:00
followrequest_test.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
fromclientapi.go [feature/performance] support uncaching remote emoji + scheduled cleanup functions (#1987) 2023-07-24 13:14:13 +01:00
fromclientapi_test.go [feature] Add List functionality (#1802) 2023-05-25 10:37:38 +02:00
fromcommon.go [bugfix] Invalidate timeline entries for status when stats change (#1879) 2023-06-11 10:18:44 +01:00
fromfederator.go [bugfix] Update account `Update` logic (#1984) 2023-07-12 12:20:15 +01:00
fromfederator_test.go [feature] status refetch support (#1690) 2023-05-12 11:15:54 +02:00
instance.go [chore/bugfix] Domain block tidying up, Implement first pass of `207 Multi-Status` (#1886) 2023-07-07 11:34:12 +02:00
oauth.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
preferences.go [feature] Implement the preferences client API (#1740) 2023-05-06 17:42:58 +02:00
preferences_test.go [feature] Implement the preferences client API (#1740) 2023-05-06 17:42:58 +02:00
processor.go [feature] Add partial text search for accounts + statuses (#1836) 2023-06-21 17:26:40 +01:00
processor_test.go [chore] tidy up media manager, add calling func to errors, build-script improvements (#1835) 2023-05-28 14:08:35 +02:00
util.go [feature] status refetch support (#1690) 2023-05-12 11:15:54 +02:00