summaryrefslogtreecommitdiff
path: root/internal/state/state.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2024-04-16 13:10:13 +0200
committerLibravatar GitHub <noreply@github.com>2024-04-16 13:10:13 +0200
commit3cceed11b28b5f42a653d85ed779d652fd8c26ad (patch)
tree0a7f0994e477609ca705a45f382dfb62056b196e /internal/state/state.go
parent[performance] cached oauth database types (#2838) (diff)
downloadgotosocial-3cceed11b28b5f42a653d85ed779d652fd8c26ad.tar.xz
[feature/performance] Store account stats in separate table (#2831)
* [feature/performance] Store account stats in separate table, get stats from remote * test account stats * add some missing increment / decrement calls * change stats function signatures * rejig logging a bit * use lock when updating stats
Diffstat (limited to 'internal/state/state.go')
-rw-r--r--internal/state/state.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/state/state.go b/internal/state/state.go
index 6120515b9..f1eb5a9da 100644
--- a/internal/state/state.go
+++ b/internal/state/state.go
@@ -50,11 +50,12 @@ type State struct {
// functions, and by the go-fed/activity library.
FedLocks mutexes.MutexMap
- // ClientLocks provides access to this state's
- // mutex map of per URI client locks.
- //
- // Used during account migration actions.
- ClientLocks mutexes.MutexMap
+ // AccountLocks provides access to this state's
+ // mutex map of per URI locks, intended for use
+ // when updating accounts, migrating, approving
+ // or rejecting an account, changing stats,
+ // pinned statuses, etc.
+ AccountLocks mutexes.MutexMap
// Storage provides access to the storage driver.
Storage *storage.Driver