You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by "wasphin (via GitHub)" <gi...@apache.org> on 2026/09/01 17:01:30 UTC
[PR] Preserve RTMP chunk stream state on abort (brpc)
wasphin opened a new pull request, #3515:
URL: https://github.com/apache/brpc/pull/3515
### What problem does this PR solve?
Issue Number: N/A
Problem Summary:
Processing an RTMP Abort command currently deletes the target chunk stream.
This also discards its previous message header, so later compressed chunk
headers cannot be decoded. Ignoring an Abort that targets the currently
parsed chunk stream also leaves the intended state transition implicit.
### What is changed and the side effects?
Changed:
Reset the target chunk stream's incomplete message while preserving the chunk
stream and its previous message header. Extend the RTMP regression test to
cover aborting both the current and a different chunk stream.
Side effects:
- Performance effects: None expected. Abort now resets existing state instead
of deleting and potentially recreating the chunk stream.
- Breaking backward compatibility: No.
---
### Check List:
- Please make sure your changes are compilable.
- When providing us with a new feature, it is best to add related tests.
- Please follow [Contributor Covenant Code of Conduct](https://github.com/apache/brpc/blob/master/CODE_OF_CONDUCT.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] Preserve RTMP chunk stream state on abort (brpc)
Posted by "wasphin (via GitHub)" <gi...@apache.org>.
wasphin merged PR #3515:
URL: https://github.com/apache/brpc/pull/3515
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] Preserve RTMP chunk stream state on abort (brpc)
Posted by "wwbmmm (via GitHub)" <gi...@apache.org>.
wwbmmm commented on PR #3515:
URL: https://github.com/apache/brpc/pull/3515#issuecomment-5520972889
LGTM
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] Preserve RTMP chunk stream state on abort (brpc)
Posted by "wasphin (via GitHub)" <gi...@apache.org>.
wasphin commented on code in PR #3515:
URL: https://github.com/apache/brpc/pull/3515#discussion_r3915427464
##########
src/brpc/policy/rtmp_protocol.cpp:
##########
@@ -879,8 +879,7 @@ void RtmpContext::ClearChunkStream(uint32_t cs_id) {
LOG(ERROR) << "chunk_stream_id=" << cs_id << " does not exist";
return;
Review Comment:
The ERROR-level diagnostic for a missing chunk stream is existing ClearChunkStream behavior, not introduced by this change. An Abort is expected to identify a chunk stream with an in-progress message, so a missing target remains useful protocol-state diagnostics. I would keep the current logging behavior and avoid changing log policy in this focused state-preservation fix.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org
Re: [PR] Preserve RTMP chunk stream state on abort (brpc)
Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #3515:
URL: https://github.com/apache/brpc/pull/3515#discussion_r3906520788
##########
src/brpc/policy/rtmp_protocol.cpp:
##########
@@ -879,8 +879,7 @@ void RtmpContext::ClearChunkStream(uint32_t cs_id) {
LOG(ERROR) << "chunk_stream_id=" << cs_id << " does not exist";
return;
Review Comment:
`AbortChunkStream()` is documented (and used) as a best-effort reset of an existing stream, but it logs `LOG(ERROR)` when the target chunk stream doesn't exist. An Abort message can legitimately reference a stream that has never been created locally, and treating that as an error can spam logs and look like a server fault. Consider silently ignoring missing streams (or downgrading to `VLOG(1)`/`LOG(WARNING)`) while keeping the invalid-id check as an error.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org