Skip to content

Reduce database load from dashboard polling and correct activity reporting - #1074

Merged
javuto merged 1 commit into
developfrom
reduce-database-activity-audit
Oct 5, 2026
Merged

javuto merged 1 commit into
developfrom
reduce-database-activity-audit

Conversation

@javuto

@javuto javuto commented Oct 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reduce database load from polling and live event streams, and correct enrollment activity reporting.

  • Remove routine read audits while preserving mutation, download, and security events.
  • Add configurable audit retention, defaulting to 90 days, with bounded cleanup batches.
  • Count successful enrollments explicitly and classify query actions correctly.
  • Cache permissions per request and stream authorization pass while preserving revocation checks.
  • Safely remove redundant status/result UUID indexes without changing existing column types.

Validation

  • Full Go test suite passed.
  • TypeScript checks and audit-page tests passed.
  • OpenAPI check passed.
  • Added regression tests for retention, enrollment classification, permission revocation, and index upgrades.
  • Live MySQL/PostgreSQL migration tests were skipped because test databases were unavailable.

Operational notes

Audit cleanup runs at API startup and hourly. Configure a longer retention period before rollout if needed. Historical enrollment counts are not reconstructed from generic node audit rows.

@javuto javuto added ✨ enhancement New feature or request backend Backend related issues ⚡️ performance Performance related issues labels Oct 5, 2026
@javuto
javuto merged commit 2902718 into develop Oct 5, 2026
7 of 9 checks passed
@javuto
javuto deleted the reduce-database-activity-audit branch October 5, 2026 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Backend related issues ✨ enhancement New feature or request ⚡️ performance Performance related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant