mirror of
https://github.com/floci-io/floci.git
synced 2026-11-23 22:11:36 -05:00
* fix(kinesis): expire shard records past the stream's retention period Shards kept every record for the life of the stream, so memory grew without bound and TRIM_HORIZON returned records older than the retention period. Drop records older than the retention period when a shard is written or read, including right after DecreaseStreamRetentionPeriod. Continuation and LATEST iterators now resume by sequence number instead of by array index, so trimming older records does not make a consumer skip data. Index-based iterators issued by earlier versions, such as persisted Firehose checkpoints, are offset by the number of records pruned since. * fix(kinesis): read a shard's records and pruned count under one lock A legacy index iterator is offset by the number of records pruned since it was issued. The records and the count were read in two separate lock acquisitions, so a prune between them left the count ahead of the snapshot and the consumer resumed too early, replaying records it had already read. Take both from one snapshot. * chore: rerun CI * test(kinesis): pin the service clock instead of stretching retention The JSON handler timestamp tests raised retention to 8760 hours so a fixed 2026 arrival timestamp survived pruning against the wall clock, which would start failing a year later. Build those services with a clock fixed just after the literal instead, and restore the fixed 2026-01-01 base in millisBehindLatestIsTimeDeltaWhenBatchLimitHit.