gfe-relnote: deprecate gfe2_reloadable_flag_quic_write_with_transmission.
PiperOrigin-RevId: 307464457
Change-Id: I77204cd9e8787280c8576e048af9977001ab0e7f
diff --git a/quic/core/quic_control_frame_manager.cc b/quic/core/quic_control_frame_manager.cc
index f4b01ff..ba00b88 100644
--- a/quic/core/quic_control_frame_manager.cc
+++ b/quic/core/quic_control_frame_manager.cc
@@ -292,9 +292,6 @@
DCHECK(session_->connection()->connected())
<< ENDPOINT << "Try to write control frames when connection is closed.";
while (HasBufferedFrames()) {
- if (!session_->write_with_transmission()) {
- session_->SetTransmissionType(NOT_RETRANSMISSION);
- }
QuicFrame frame_to_send =
control_frames_.at(least_unsent_ - least_unacked_);
QuicFrame copy = CopyRetransmittableControlFrame(frame_to_send);
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index e79ec24..9172ed7 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -45,24 +45,6 @@
QuicSession* session_;
};
-// TODO(renjietang): remove this function once
-// gfe2_reloadable_flag_quic_write_with_transmission is deprecated.
-void CountTransmissionTypeFlag(TransmissionType type) {
- switch (type) {
- case NOT_RETRANSMISSION:
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 1, 4);
- break;
- case HANDSHAKE_RETRANSMISSION:
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 2, 4);
- break;
- case LOSS_RETRANSMISSION:
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 3, 4);
- break;
- default:
- QUIC_RELOADABLE_FLAG_COUNT_N(quic_write_with_transmission, 4, 4);
- }
-}
-
} // namespace
#define ENDPOINT \
@@ -121,8 +103,6 @@
num_expected_unidirectional_static_streams_(
num_expected_unidirectional_static_streams),
enable_round_robin_scheduling_(false),
- write_with_transmission_(
- GetQuicReloadableFlag(quic_write_with_transmission)),
deprecate_draining_streams_(
GetQuicReloadableFlag(quic_deprecate_draining_streams)),
break_close_loop_(
@@ -566,9 +546,6 @@
"write blocked.";
return;
}
- if (!write_with_transmission_) {
- SetTransmissionType(NOT_RETRANSMISSION);
- }
// We limit the number of writes to the number of pending streams. If more
// streams become pending, WillingAndAbleToWrite will be true, which will
// cause the connection to request resumption before yielding to other
@@ -722,10 +699,7 @@
return QuicConsumedData(0, false);
}
- if (write_with_transmission_) {
- SetTransmissionType(type);
- CountTransmissionTypeFlag(type);
- }
+ SetTransmissionType(type);
const auto current_level = connection()->encryption_level();
if (level.has_value()) {
connection()->SetDefaultEncryptionLevel(level.value());
@@ -751,10 +725,7 @@
QuicStreamOffset offset,
TransmissionType type) {
DCHECK(QuicVersionUsesCryptoFrames(transport_version()));
- if (write_with_transmission_) {
- SetTransmissionType(type);
- CountTransmissionTypeFlag(type);
- }
+ SetTransmissionType(type);
const auto current_level = connection()->encryption_level();
connection_->SetDefaultEncryptionLevel(level);
const auto bytes_consumed =
@@ -766,10 +737,7 @@
bool QuicSession::WriteControlFrame(const QuicFrame& frame,
TransmissionType type) {
- if (write_with_transmission_) {
- SetTransmissionType(type);
- CountTransmissionTypeFlag(type);
- }
+ SetTransmissionType(type);
return connection_->SendControlFrame(frame);
}
@@ -2130,9 +2098,6 @@
void QuicSession::RetransmitFrames(const QuicFrames& frames,
TransmissionType type) {
QuicConnection::ScopedPacketFlusher retransmission_flusher(connection_);
- if (!write_with_transmission_) {
- SetTransmissionType(type);
- }
for (const QuicFrame& frame : frames) {
if (frame.type == MESSAGE_FRAME) {
// Do not retransmit MESSAGE frames.
@@ -2226,18 +2191,12 @@
bool uses_crypto_frames = QuicVersionUsesCryptoFrames(transport_version());
QuicCryptoStream* crypto_stream = GetMutableCryptoStream();
if (uses_crypto_frames && crypto_stream->HasPendingCryptoRetransmission()) {
- if (!write_with_transmission_) {
- SetTransmissionType(HANDSHAKE_RETRANSMISSION);
- }
crypto_stream->WritePendingCryptoRetransmission();
}
// Retransmit crypto data in stream 1 frames (version < 47).
if (!uses_crypto_frames &&
QuicContainsKey(streams_with_pending_retransmission_,
QuicUtils::GetCryptoStreamId(transport_version()))) {
- if (!write_with_transmission_) {
- SetTransmissionType(HANDSHAKE_RETRANSMISSION);
- }
// Retransmit crypto data first.
QuicStream* crypto_stream =
GetStream(QuicUtils::GetCryptoStreamId(transport_version()));
@@ -2252,9 +2211,6 @@
}
}
if (control_frame_manager_.HasPendingRetransmission()) {
- if (!write_with_transmission_) {
- SetTransmissionType(LOSS_RETRANSMISSION);
- }
control_frame_manager_.OnCanWrite();
if (control_frame_manager_.HasPendingRetransmission()) {
return false;
@@ -2268,9 +2224,6 @@
const QuicStreamId id = streams_with_pending_retransmission_.begin()->first;
QuicStream* stream = GetStream(id);
if (stream != nullptr) {
- if (!write_with_transmission_) {
- SetTransmissionType(LOSS_RETRANSMISSION);
- }
stream->OnCanWrite();
DCHECK(CheckStreamWriteBlocked(stream));
if (stream->HasPendingRetransmission()) {
diff --git a/quic/core/quic_session.h b/quic/core/quic_session.h
index f67c097..9d94289 100644
--- a/quic/core/quic_session.h
+++ b/quic/core/quic_session.h
@@ -415,11 +415,6 @@
// Returns true if this stream should yield writes to another blocked stream.
virtual bool ShouldYield(QuicStreamId stream_id);
- // Set transmission type of next sending packets.
- // TODO(b/136274541): Remove this method or or make it private after
- // gfe2_reloadable_flag_quic_write_with_transmission is deprecated.
- void SetTransmissionType(TransmissionType type);
-
// Clean up closed_streams_.
void CleanUpClosedStreams();
@@ -491,8 +486,6 @@
// uses TLS handshake.
virtual void OnAlpnSelected(quiche::QuicheStringPiece alpn);
- bool write_with_transmission() const { return write_with_transmission_; }
-
bool deprecate_draining_streams() const {
return deprecate_draining_streams_;
}
@@ -525,6 +518,9 @@
// Adds |stream| to the stream map.
virtual void ActivateStream(std::unique_ptr<QuicStream> stream);
+ // Set transmission type of next sending packets.
+ void SetTransmissionType(TransmissionType type);
+
// Returns the stream ID for a new outgoing bidirectional/unidirectional
// stream, and increments the underlying counter.
QuicStreamId GetNextOutgoingBidirectionalStreamId();
@@ -841,9 +837,6 @@
// If true, enables round robin scheduling.
bool enable_round_robin_scheduling_;
- // Latched value of gfe2_reloadable_flag_quic_write_with_transmission.
- const bool write_with_transmission_;
-
// Latched value of quic_deprecate_draining_streams.
const bool deprecate_draining_streams_;
diff --git a/quic/core/quic_stream.cc b/quic/core/quic_stream.cc
index 75cb9f9..15212f9 100644
--- a/quic/core/quic_stream.cc
+++ b/quic/core/quic_stream.cc
@@ -1082,9 +1082,6 @@
QUIC_DVLOG(1) << "stream " << id() << " shortens write length to "
<< write_length << " due to flow control";
}
- if (!session_->write_with_transmission()) {
- session_->SetTransmissionType(NOT_RETRANSMISSION);
- }
StreamSendingState state = fin ? FIN : NO_FIN;
if (fin && add_random_padding_after_fin_) {