Repository navigation
Various perf updates and fixes #194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
fe9dc4f
6a3e36c
d5cada2
dd0069f
4f36537
5124997
8786e66
aba596a
d4418be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,6 +15,12 @@ namespace laps { | |
| } | ||
| } | ||
|
|
||
| void | ||
| laps::PublishNamespaceHandler::UnpublishTrack(std::uint64_t track_alias) | ||
| { | ||
| published_tracks_.erase(track_alias); | ||
| } | ||
|
|
||
| void | ||
| laps::PublishNamespaceHandler::PublishTrack(std::shared_ptr<quicr::PublishTrackHandler> handler) | ||
| { | ||
|
|
@@ -152,8 +158,6 @@ laps::PublishNamespaceHandler::UpdateTrackRanking( | |
|
|
||
| if (published_tracks_.size() > active_tracks.size()) { | ||
|
|
||
| std::vector<std::uint64_t> remove_publish_tracks; | ||
|
|
||
| // Unpublish tracks that are too old | ||
| for (auto& [ta, track] : published_tracks_) { | ||
| if (active_tracks.contains(ta)) { | ||
|
|
@@ -182,21 +186,14 @@ laps::PublishNamespaceHandler::UpdateTrackRanking( | |
| } | ||
|
|
||
| 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); | ||
|
Comment on lines
188
to
+193
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This branch now only logs once a paused track exceeds the cleanup delay, while the sole new Useful? React with 👍 / 👎. |
||
| } | ||
| } | ||
| } | ||
|
|
||
| if (!remove_publish_tracks.empty()) { | ||
| for (const auto& ta: remove_publish_tracks) { | ||
| published_tracks_.erase(ta); | ||
| } | ||
| } | ||
| } | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When two connections publish the same full track name, they share
pub_ta, and the code immediately above explicitly detects that another publisher remains viahave_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 whenhave_publishersis false, or rebind the namespace entry to a remaining publisher.Useful? React with 👍 / 👎.