Skip to content

Add bounded maintenance for historical request logs - #3218

Merged
shizn merged 1 commit into
mainfrom
fix/bounded-request-log-retention-nov29
Nov 29, 2026
Merged

shizn merged 1 commit into
mainfrom
fix/bounded-request-log-retention-nov29

Conversation

@shizn

@shizn shizn commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Add an operator command for expired rows in stats_api_requests and access_logs. Each invocation takes a table, expected database and a UTC cutoff. The default previews up to one batch. Explicit application commits at most 1,000 rows and emits a count. The statistics table preserves the rolling calendar month used by collection reporting. Operators can resume using the same cutoff after a partial run or later backfill.

Fourteen focused tests passed, including three TiDB integration cases. The TypeScript build passed. The compiled command also ran against both repository schemas on an isolated TiDB 8.5.1 instance with a table-scoped maintenance account. Each table returned a bounded preview, deleted three expired synthetic rows across two batches, returned zero on retry, and retained the exact cutoff row.

No job runs on merge. Production use requires a data-owner-approved cutoff, hold and recovery checks, and a separate maintenance credential. The runbook covers scheduling, pacing and verification of relevant backups.

@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ossinsight-docs Ready Ready Preview Nov 29, 2026 2:52pm UTC
ossinsight-web Ready Ready Preview Nov 29, 2026 2:52pm UTC

Request Review

@shizn
shizn merged commit 4e396ef into main Nov 29, 2026
5 checks passed
@shizn
shizn deleted the fix/bounded-request-log-retention-nov29 branch November 29, 2026 14:58

This branch was successfully deployed

2 active deployments
Preview – ossinsight-web — 49c9b7d9 Deployed Nov 29, 2026 by vercel[bot]
Preview – ossinsight-docs — 49c9b7d9 Deployed Nov 29, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant