-
Notifications
You must be signed in to change notification settings - Fork 265
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Problem
When QuoteHub has pruned historical quotes and the cache contains only the most recent N quotes, calling Insert(quote) or Add(quote) with a quote that precedes the current timeline (before the first timestamp in the cache) creates an indeterminate gap in the data.
Current Behavior
- After pruning, cache contains quotes [500..2000] (if max cache size is 1500)
- Calling
Insert(quote_100)would:- Slot in at beginning of timeline
- Create gap: quote 100, then missing 101-499, then 500-2000
- Increase cache size without triggering prune
- Send rebuild command to subscribers
Expected Behavior
QuoteHub should ignore Insert and Add operations for quotes that precede the current timeline (before Results[0].Timestamp after pruning).
Implementation Notes
- Check if incoming quote timestamp is before
Results[0].Timestamp - If yes, ignore the operation (no-op)
- Consider logging a debug message for such cases
- This prevents indeterminate gaps and maintains timeline integrity
Related
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Projects
Status
Done