gotosocial/internal/federation/dereferencing
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.go [bugfix] Update account Update logic (#1984) 2023-07-12 12:20:15 +01:00
account_test.go [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
announce.go [feature] status refetch support (#1690) 2023-05-12 11:15:54 +02:00
collectionpage.go [feature] status refetch support (#1690) 2023-05-12 11:15:54 +02:00
dereferencer.go [bugfix] Reorder web view logic, other small fixes (#1954) 2023-07-07 14:58:53 +02:00
dereferencer_test.go [feature] Add List functionality (#1802) 2023-05-25 10:37:38 +02:00
emoji.go [chore] tidy up media manager, add calling func to errors, build-script improvements (#1835) 2023-05-28 14:08:35 +02:00
emoji_test.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
error.go [bugfix/chore] oauth entropy fix + media cleanup tasks rewrite (#1853) 2023-06-22 20:46:36 +01:00
finger.go [feature] status refetch support (#1690) 2023-05-12 11:15:54 +02:00
handshake.go [bugfix] Reorder web view logic, other small fixes (#1954) 2023-07-07 14:58:53 +02:00
instance.go [feature] status refetch support (#1690) 2023-05-12 11:15:54 +02:00
media.go [chore] tidy up media manager, add calling func to errors, build-script improvements (#1835) 2023-05-28 14:08:35 +02:00
media_test.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
status.go [bugfix] Ensure InReplyToID set properly, update dereference ancestors func (#1921) 2023-06-24 08:32:10 +01:00
status_test.go [feature] status refetch support (#1690) 2023-05-12 11:15:54 +02:00
thread.go [bugfix] Only mark status orphaned on 410 Gone (#1923) 2023-06-24 13:59:28 +02:00