Commit Graph

5 Commits (f54c3f394fe48e82eb86a1890c610261a8e3a62d)

Author SHA1 Message Date
Your Name a187ab6639 Refactor profile count reconciliation into shared AccountStatService methods
Extract canonical source-of-truth count logic into AccountStatService:
recalculateStatusCount/FollowerCount/FollowingCount and a
reconcileProfileCounts() that fixes only drifted columns and busts caches.

Both the scheduled app:account-post-count-stat-update (status-only, its
correct scope) and fix:profilecounts now use these instead of duplicating
the SQL. Also corrects the status_count definition to match the actual
increment logic in StatusEntityLexer/StatusDelete (media post types only:
photo/video albums), rather than the previous inconsistent all-statuses /
scoped counts that could themselves cause drift.

The scheduled updater keeps its incremental, dirty-set design and remains
status-only; follower/following stay owned by FollowServiceWarmCache.
4 weeks ago
Daniel Supernault 806e210f13
Update snowflake config, allow custom datacenter/worker ids 2 years ago
Daniel Supernault 134eb6324e
Update AccountPostCountStatUpdate, fix memory leak 2 years ago
Daniel Supernault b81ae5773f
Update AP helpers, refactor post count decrement logic 3 years ago
Daniel Supernault 7caed381fb
Update AP helpers, more efficently update post counts 3 years ago