Repository navigation
Various perf updates and fixes - #194
Conversation
TimEvens
commented
Sep 18, 2026
- Fixes lingering publish namespace publish tracks, they are now removed on publish done
- Fixes excessive call to namespace handler for top-n
- Updates refresh ranking interval to 500ms
* Fixes lingering publish namespace publish tracks, they are now removed on publish done * Fixes excessive call to namespace handler for top-n * Updates refresh ranking interval to 500ms
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe9dc4fb05
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| continue; | ||
| } | ||
|
|
||
| pub_ns_h->UnpublishTrack(pub_ta); |
There was a problem hiding this comment.
Keep shared tracks until the last publisher finishes
When two connections publish the same full track name, they share pub_ta, and the code immediately above explicitly detects that another publisher remains via have_publishers. This unconditional erase nevertheless removes the shared track from every matching namespace handler when either publisher sends PUBLISH_DONE; later ranking updates report the alias as missing and cannot select or resume the remaining live publication. Only unpublish when have_publishers is false, or rebind the namespace entry to a remaining publisher.
Useful? React with 👍 / 👎.
| if (cur_tick - track.last_updated_tick > delay_publish_done_ms_) { | ||
| SPDLOG_INFO("Unpublish track, not in top-n track alias: {} conn_id: {} ticks: {} < {}", | ||
| ta, | ||
| GetConnectionId(), | ||
| track.last_updated_tick, | ||
| cur_tick); | ||
| remove_publish_tracks.push_back(ta); | ||
| SPDLOG_TRACE("Unpublish track, not in top-n track alias: {} conn_id: {} ticks: {} < {}", | ||
| ta, | ||
| GetConnectionId(), | ||
| track.last_updated_tick, | ||
| cur_tick); |
There was a problem hiding this comment.
Preserve cleanup for teardown paths without PUBLISH_DONE
This branch now only logs once a paused track exceeds the cleanup delay, while the sole new UnpublishTrack call is in PublishDoneReceived. If a publisher disconnects abruptly or ends a publish namespace, the existing teardown paths remove it from client state without invoking that callback, leaving its alias in published_tracks_; a later publisher of the same alias cannot replace the stale entry because PublishTrack uses emplace, so ranking can continue using an obsolete or expired handler. Wire those teardown paths to UnpublishTrack or retain the delayed erase as a fallback.
Useful? React with 👍 / 👎.