Skip to content

RM-340: Make the gateway stream trim length configurable - #158

Merged
BenHall-1 merged 1 commit into
masterfrom
RM-340
Oct 3, 2026
Merged

BenHall-1 merged 1 commit into
masterfrom
RM-340

Conversation

@biast12

@biast12 biast12 commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

RM-340

Description

The worker trimmed stream:gateway-events to a hardcoded ~50000 entries. It now reads STREAMS_MAX_LEN, which defaults to 50000, so behaviour is unchanged until it's set.

This deliberately doesn't reuse GATEWAY_STREAM_MAX_LEN: prod already sets that to 1000000 on the worker, so this merge would raise retention immediately. Before setting STREAMS_MAX_LEN higher, check Redis memory and fix common/rpc acking with a cancelled context on shutdown. Otherwise XAUTOCLAIM replays messages that were already handled.

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works

Use the configured `STREAMS_MAX_LEN` value when creating the worker event stream instead of hardcoding a 50,000-entry limit.
@biast12
biast12 requested a review from a team as a code owner October 1, 2026 18:16
@github-actions github-actions Bot added the type:feature New Feature label Oct 1, 2026
@BenHall-1
BenHall-1 merged commit 2fca93b into master Oct 3, 2026
1 check passed
@BenHall-1
BenHall-1 deleted the RM-340 branch October 3, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants