relay: count ingest on the relay executor, drop bogus subscriber counts - #630
Merged
afrind merged 1 commit intoAug 26, 2026
Merged
Conversation
akash-a-n
approved these changes
Aug 25, 2026
akash-a-n
left a comment
Contributor
There was a problem hiding this comment.
@akash-a-n reviewed 10 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on afrind).
/state read each subscription's counters off the forwarder, which in LocalForwarder mode belongs to another executor -- so the walk skipped it and reported zeros for every track. The two subscriber counts it reported were per-forwarder besides: "subscribers on this thread's forwarder", not on the relay. TerminationFilter, already installed on both chain branches, becomes RelayIngestFilter and counts objects as they pass, into an IngestCounters the registry entry holds: void record(uint64_t group, uint64_t object); // objects, groups, largest Distinct groups go through the same RecentGroupWindow TrackStatsFilter uses, so interleaved subgroups are not counted twice. /state reads those, so total_groups_received, total_objects_received and largest are right in every mode; subscribers and forwarding_subscribers are gone, and with them the json_exporter module that built per-track series out of /state -- moqx_track_subscribers from /metrics/track is the real number. Also drops getSubscribeWriteback, dead since the chain builder took over. MoqxRelayStateTests walks /state in all three relay modes. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
afrind
force-pushed
the
relay/count-ingest-on-relay-executor
branch
from
August 26, 2026 16:18
bb08ccf to
0ced834
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/state read each subscription's counters off the forwarder, which in LocalForwarder mode belongs to another executor -- so the walk skipped it and reported zeros for every track. The two subscriber counts it reported were per-forwarder besides: "subscribers on this thread's forwarder", not on the relay.
TerminationFilter, already installed on both chain branches, becomes RelayIngestFilter and counts objects as they pass, into an IngestCounters the registry entry holds:
Distinct groups go through the same RecentGroupWindow TrackStatsFilter uses, so interleaved subgroups are not counted twice. /state reads those, so total_groups_received, total_objects_received and largest are right in every mode; subscribers and forwarding_subscribers are gone, and with them the json_exporter module that built per-track series out of /state -- moqx_track_subscribers from /metrics/track is the real number. Also drops getSubscribeWriteback, dead since the chain builder took over.
MoqxRelayStateTests walks /state in all three relay modes.
This change is