Plan scalable Recent Gamer Updates feed storage #3
Labels
No labels
automated
code-quality
component: admin dashboard
component: backend
component: billing
component: content management
component: faqs
component: game genres
component: game lists
component: game reviews
component: game search
component: games
component: internal notifications
component: platforms
component: security
component: tests
component: user api
component: user badges
component: user blogs
component: user consoles
component: user favorites
component: user friends
component: user notifications
component: user profiles
component: user site notifications
component: user wishlists
component: web design
dependencies
javascript
php
priority
high
priority
low
priority
medium
security-hotspot
source: codex
source: sonarqube
status
awaiting feedback
status
backlog
status
done
status
in progress
status
in queue
status
in review
status
needs codex review
status
needs investigation
status
wontfix
type: bug
type: documentation
type: feature
type: improvement
type: regression
type: task
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MyVideoGameList/myvideogamelist.com#3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Recent Gamer Updates feed needs a scalable Laravel storage strategy so the site can keep public activity pages fast without blindly deleting historical user activity.
The original issue proposed trimming or truncating the old feed table, but later comments clarified that people do use the feed and that historical records should ideally be preserved. In the current Laravel checkout, feed entries are written to Spatie activity log table with
log_name = gamer_updates, displayed through theRecentGamerUpdatespresenter, and surfaced on the homepage/sidebar and the dedicated Recent Gamer Updates page. This issue tracks deciding and implementing the long-term storage, indexing, archival, and query strategy for that feed.Scope
activity_logrecords used forgamer_updates./recent-gamer-updateslisting page showing the 50 newest visible entries, without pagination.Acceptance Criteria
gamer_updatesactivity entries continue to render with user, avatar, game, platform, activity type, and timestamp data.Test Coverage Required
gamer_updatesrecords render expected card/list data.vendor/bin/pint --dirtybefore closing the issue.Progress Checklist
gamer_updatesactivity entries are written from game-list status changesRecentGamerUpdatespresenter exists/recent-gamer-updatesexists/recent-gamer-updatespage limited to the 50 newest visible entries, without paginationConfirmed implementation direction
Preserve historical gamer updates in the existing
activity_logtable. Add a composite(log_name, created_at, id)index and stable newest-first reads; protectgamer_updatesfrom age-based cleanup. Homepage/sidebar cards show 10 entries and the dedicated page shows 50, without pagination. The admin dashboard activity list shows admin actions only. Validate the strategy with a disposable million-row MariaDB dataset before closeout.Acceptance review and implementation evidence
Implementation and inventory are documented in PR #962. The PR was merged and the user authorized deployment to both environments. The merged release and new index are now verified on dev and prod.
created_at DESC, id DESC. Cards show 10 and the dedicated page shows 50 without pagination. Admin reads select onlyadmin, ordered identically and limited to 15.de69e0902696977b0133752543df80510f566c62; the PR links the runs and records the existing Pest warnings alongside the no-failure result (5,407 assertions).Deployment verification — 2026-10-07
Merged revision
04b64436b75a4cc06934d4a7ee883c689a15acf6was deployed to both dev and prod with application rollback backups. Only2026_10_07_120000_add_feed_order_index_to_activity_log_tablewas migrated (190 ms dev / 68 ms prod); the two older dev migrations were initially left untouched and subsequently applied after separate authorization (game-list status-count index and unavailable-badge cleanup).Both environments have the new composite index and protected cleanup action, retain all 15,761 activity records and their ID range, and match all 414 staged application files. The 10/50-entry reads, live 50-entry page, homepage/login responses, settings login redirect and served CSS/JavaScript hashes were verified. Both environments now have no pending migrations. The follow-up dev badge migration had no existing awards to delete; affected badge rows were backed up before execution.
Originally posted by josh87
Maybe you can trim it down by date?
@josh87 Yeah, I was thinking about how to do it. I was thinking just select 100,000 rows, truncate, then reinsert them. I have to remember which resets the auto-increment back to 1.
Originally posted by josh87
Well
truncatewill drop all records from a table and resetauto_increment.I am not sure the value it would add to remove this data from the database on a periodic schedule. The only time I have noticed it going slow is when loading the Edit User page from the administrative dashboard side of things. I'd like to think this is a low priority issue at the moment.
We need to do some research and see if this page/functionality is really even used by anyone.
So people definitely do look at this page (I asked in our Discord server), so we'll need to figure out how to handle the feed. Ideally I don't want to remove any records but at the same time, the table is massive.
Implement Handling of The Feed (Database Table and Related Pages)to Plan scalable Recent Gamer Updates feed storageCompleted in PR #962 and deployed to dev and prod on merged revision
04b64436b75a4cc06934d4a7ee883c689a15acf6.activity_logtable. No archive, backfill, truncation, ID reset or gamer-history retention deletion was introduced. Production-data synchronization remains compatible./recent-gamer-updatesdisplays the newest 50 without pagination. Ordering iscreated_at DESC, id DESC. Privacy, banned/deleted/missing users, deleted comment subjects and existing presentation remain covered. The admin dashboard displays only the newest 15 admin actions.(log_name, created_at, id)index preserves old indexes and records, and its migration tolerates repeated execution. Scalar visibility checks are intentional: MariaDB otherwise chose history scans/materialization and sorting. Global and explicitly targeted Spatie cleanup always preservegamer_updates; other logs retain their existing age policy. Rolling back the index only drops that index; reverting cleanup configuration would restore the previous gamer-history deletion behavior.All applicable acceptance criteria and checklist items are complete. Archive-job and split-boundary requirements are not applicable to the chosen single-table strategy.