Skip to content

solana-autopilot: prune expired quotes and old order events - #4927

Draft
squadgazzz wants to merge 6 commits into
mainfrom
solana-autopilot/be-249-db-cleanup
Draft

squadgazzz wants to merge 6 commits into
mainfrom
solana-autopilot/be-249-db-cleanup

Conversation

@squadgazzz

Copy link
Copy Markdown
Contributor

Description

Nothing deletes from solana.quotes or solana.order_events, so both grow forever. The autopilot now runs a periodic cleanup like the EVM one: expired quotes go regardless of age (an expired quote already fails the order link check, nothing reads it back), and order events go after a configurable age, 30 days by default. The order status endpoint tolerates pruned events, it falls back through trades, cancellation, and Scheduled, the same degradation the EVM accepted for its own event cleanup.

Changes

  • A Cleanup task deleting expired quotes and old order events on an interval
  • [db-cleanup] config section with cleanup-interval (1d) and cleanup-threshold (30d), matching the EVM defaults

How to test

New postgres test for both deletions, extended the example config test.

Related issues

BE-249

@linear-code

linear-code Bot commented Sep 17, 2026

Copy link
Copy Markdown

BE-249

Base automatically changed from solana-orderbook/be-249-persist-quotes to main September 17, 2026 13:38
@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale because it has been inactive a while. Please update this pull request or it will be automatically closed.

@github-actions github-actions Bot added the stale label Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant