From 7094da18fba9182ad70abc0e51af1b0a5a08bfc2 Mon Sep 17 00:00:00 2001 From: Hani Damlaj Date: Sun, 18 Oct 2026 10:36:38 -0700 Subject: [PATCH] remove `HQUpstreamSession::tryBindIngressStreamToTxn` Summary: removes `HQUpstreamSession` logic to bind ingress push streams to transactions, continued efforts to remove all things http push related in proxygen/lib Reviewed By: jbeshay, Carl-Elkhoury Differential Revision: D124382298 fbshipit-source-id: f57b916ab691afc0bda49ebd1180bdcafed7ddd4 --- .../lib/http/session/HQUpstreamSession.cpp | 31 ------------------- proxygen/lib/http/session/HQUpstreamSession.h | 9 ------ 2 files changed, 40 deletions(-) diff --git a/proxygen/lib/http/session/HQUpstreamSession.cpp b/proxygen/lib/http/session/HQUpstreamSession.cpp index 64fefeae4..1d18fd005 100644 --- a/proxygen/lib/http/session/HQUpstreamSession.cpp +++ b/proxygen/lib/http/session/HQUpstreamSession.cpp @@ -164,37 +164,6 @@ void HQUpstreamSession::detachThreadLocals(bool) { } } -bool HQUpstreamSession::tryBindIngressStreamToTxn( - quic::StreamId streamId, - hq::PushId pushId, - HQIngressPushStream* pushStream) { - // lookup pending nascent stream id - CHECK(pushStream); - - VLOG(4) << __func__ << " attempting to bind streamID=" << streamId - << " to pushID=" << pushId; - pushStream->bindTo(streamId); - -#if defined(DEBUG) && DEBUG - // Check postconditions - the ingress push stream - // should own both the push id and the stream id. - // No nascent stream should own the stream id - auto streamById = findIngressPushStream(streamId); - auto streamByPushId = findIngressPushStreamByPushId(pushId); - - DCHECK_EQ(streamId, pushStream->getIngressStreamId()); - DCHECK(streamById) << "Ingress stream must be bound to the streamID=" - << streamId; - DCHECK(streamByPushId) << "Ingress stream must be found by the pushID=" - << pushId; - DCHECK_EQ(streamById, streamByPushId) << "Must be same stream"; -#endif - - VLOG(4) << __func__ << " successfully bound streamID=" << streamId - << " to pushID=" << pushId; - return true; -} - HQUpstreamSession::HQIngressPushStream* FOLLY_NULLABLE HQUpstreamSession::findIngressPushStream(quic::StreamId streamId) { auto res = streamIdToPushId_.find(streamId); diff --git a/proxygen/lib/http/session/HQUpstreamSession.h b/proxygen/lib/http/session/HQUpstreamSession.h index 824b4cbb3..3c82aed2a 100644 --- a/proxygen/lib/http/session/HQUpstreamSession.h +++ b/proxygen/lib/http/session/HQUpstreamSession.h @@ -210,15 +210,6 @@ class HQUpstreamSession : public HQSession { uint32_t numberOfIngressPushStreams() const; - /** - * Attempt to bind an ingress push stream object (which has the txn) - * to a nascent stream (which has the transport/codec). - * returns true if binding was successful - */ - bool tryBindIngressStreamToTxn(quic::StreamId streamID, - hq::PushId pushId, - HQIngressPushStream* pushStream = nullptr); - bool erasePushStream(quic::StreamId streamId) override; void eraseUnboundStream(HQStreamTransportBase*) override;