From 3cceed11b28b5f42a653d85ed779d652fd8c26ad Mon Sep 17 00:00:00 2001 From: tobi <31960611+tsmethurst@users.noreply.github.com> Date: Tue, 16 Apr 2024 13:10:13 +0200 Subject: [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 --- internal/state/state.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'internal/state/state.go') 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 -- cgit v1.2.3