-
Notifications
You must be signed in to change notification settings - Fork 7
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
Joining fetch #521
Joining fetch #521
Conversation
I am sure there is some state cleanup missing here. |
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.
Some comments/changes. Joining fetch does appear to work nicely but with this branch fetch doesn't appear to work with qclient
.
* | ||
* @returns true if the range of groups and objects exist in the cache, otherwise returns false. | ||
*/ | ||
bool FetchReceived([[maybe_unused]] quicr::ConnectionHandle connection_handle, |
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.
The thought here is that a fetch could be denied. We still need that for the future, but I suppose we can add it back then.
@@ -279,20 +289,14 @@ namespace quicr { | |||
*/ | |||
virtual void UnsubscribeReceived(ConnectionHandle connection_handle, uint64_t subscribe_id) = 0; | |||
|
|||
// TODO: Their is probably a distinction between track not found, and no objects. |
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.
// TODO: Their is probably a distinction between track not found, and no objects. | |
// TODO: There is probably a distinction between track not found, and no objects. |
@@ -86,7 +86,7 @@ namespace quicr { | |||
conn_ctx.current_subscribe_id = msg.subscribe_id + 1; | |||
} | |||
|
|||
conn_ctx.recv_sub_id[msg.subscribe_id] = { th.track_namespace_hash, th.track_name_hash }; | |||
conn_ctx.recv_sub_id[msg.subscribe_id] = { .track_full_name = tfn }; |
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.
Supported >= c++20
src/client.cpp
Outdated
@@ -120,7 +120,7 @@ namespace quicr { | |||
ptd->SetTrackAlias(msg.track_alias); | |||
ptd->SetStatus(PublishTrackHandler::Status::kOk); | |||
|
|||
conn_ctx.recv_sub_id[msg.subscribe_id] = { th.track_namespace_hash, th.track_name_hash }; | |||
conn_ctx.recv_sub_id[msg.subscribe_id] = { .track_full_name = tfn }; |
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.
Supported >= c++20
@TimEvens Thanks for the review. I'm not sure I can reproduce fetch not working here. I ran a few sessions using these commands:
The subscriber shows:
And the fetcher shows:
|
I do see that potentially a valid range per the spec could get rejected here. But the logic for what to deliver seems complicated / not that well defined. Especially when start of ranges are no longer available, or whole groups are missing. Even with gaps, we need end of group implemented to be able to tell the difference between something missing and something that was never there. Even then I think there's potential fragility. Perhaps we should cover cache retrieval / fetch resolution as a whole new thing. |
Yes, it's the range that doesn't work. Requesting group ZERO and just an object works, but requesting a range or even another group doesn't work. For example, run the below to start things off and wait for groups to increment a few.
Now request any range of objects or groups, it doesn't work.
|
* Fix subscribe ID in fetch error * Fix cache not expiring * Add fetch error reason to log message on client side * Terminate client after end of fetch, including on error
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.
Fetch should be working now as expected. There is still a lot that needs to be done with fetch, including handling race conditions, but the MoQT spec is in flux and will likely change because it's flawed.
Implement joining fetch.
The idea here, (if others agree), if that joining fetches are so tied to subscriptions that the former is an extension of the latter in terms of the public facing API. When you create a
SubscribeTrackHandler
you can optionally do so with a joining fetch. Those objects will be returned to your subscribe track handler identically to how live objects would be for convenience. A fetch handler is used internally to make facilitate that mapping, although there are no guarantees about ordering or interleaving with the live stream.Fixes #362