gfe-relnote: (n/a) Deprecate --gfe2_reloadable_flag_quic_ignore_one_write_error_after_mtu_probe. PiperOrigin-RevId: 309794523 Change-Id: Iba2230ac04ed93a4da4605dd383f3fa1d572396e
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc index a3dc325..fa4b3d8 100644 --- a/quic/core/quic_connection.cc +++ b/quic/core/quic_connection.cc
@@ -2476,12 +2476,10 @@ } bool QuicConnection::ShouldIgnoreWriteError() { - if (!GetQuicReloadableFlag(quic_ignore_one_write_error_after_mtu_probe) || - previous_validated_mtu_ == 0) { + if (previous_validated_mtu_ == 0) { return false; } - QUIC_CODE_COUNT(quic_ignore_one_write_error_after_mtu_probe); SetMaxPacketLength(previous_validated_mtu_); mtu_discoverer_.Disable(); mtu_discovery_alarm_->Cancel();
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc index 5c3cbad..8b6f752 100644 --- a/quic/core/quic_connection_test.cc +++ b/quic/core/quic_connection_test.cc
@@ -5161,23 +5161,21 @@ // The last probe size should be equal to the target. EXPECT_EQ(probe_size, kMtuDiscoveryTargetPacketSizeHigh); - if (GetQuicReloadableFlag(quic_ignore_one_write_error_after_mtu_probe)) { - writer_->SetShouldWriteFail(); + writer_->SetShouldWriteFail(); - // Ignore PACKET_WRITE_ERROR once. - SendStreamDataToPeer(3, "(", stream_offset++, NO_FIN, nullptr); - EXPECT_EQ(last_probe_size, connection_.max_packet_length()); - EXPECT_TRUE(connection_.connected()); + // Ignore PACKET_WRITE_ERROR once. + SendStreamDataToPeer(3, "(", stream_offset++, NO_FIN, nullptr); + EXPECT_EQ(last_probe_size, connection_.max_packet_length()); + EXPECT_TRUE(connection_.connected()); - // Close connection on another PACKET_WRITE_ERROR. - EXPECT_CALL(visitor_, OnConnectionClosed(_, _)) - .WillOnce(Invoke(this, &QuicConnectionTest::SaveConnectionCloseFrame)); - SendStreamDataToPeer(3, ")", stream_offset++, NO_FIN, nullptr); - EXPECT_EQ(last_probe_size, connection_.max_packet_length()); - EXPECT_FALSE(connection_.connected()); - EXPECT_THAT(saved_connection_close_frame_.quic_error_code, - IsError(QUIC_PACKET_WRITE_ERROR)); - } + // Close connection on another PACKET_WRITE_ERROR. + EXPECT_CALL(visitor_, OnConnectionClosed(_, _)) + .WillOnce(Invoke(this, &QuicConnectionTest::SaveConnectionCloseFrame)); + SendStreamDataToPeer(3, ")", stream_offset++, NO_FIN, nullptr); + EXPECT_EQ(last_probe_size, connection_.max_packet_length()); + EXPECT_FALSE(connection_.connected()); + EXPECT_THAT(saved_connection_close_frame_.quic_error_code, + IsError(QUIC_PACKET_WRITE_ERROR)); } // After a successful MTU probe, one and only one write error should be ignored @@ -5226,31 +5224,29 @@ EXPECT_EQ(1u, connection_.mtu_probe_count()); - if (GetQuicReloadableFlag(quic_ignore_one_write_error_after_mtu_probe)) { - writer_->SetShouldWriteFail(); + writer_->SetShouldWriteFail(); - // Ignore PACKET_WRITE_ERROR once. - { - QuicConnection::ScopedPacketFlusher flusher(&connection_); - // flusher's destructor will call connection_.FlushPackets, which should - // get a WRITE_STATUS_ERROR from the writer and ignore it. - } - EXPECT_EQ(original_max_packet_length, connection_.max_packet_length()); - EXPECT_TRUE(connection_.connected()); - - // Close connection on another PACKET_WRITE_ERROR. - EXPECT_CALL(visitor_, OnConnectionClosed(_, _)) - .WillOnce(Invoke(this, &QuicConnectionTest::SaveConnectionCloseFrame)); - { - QuicConnection::ScopedPacketFlusher flusher(&connection_); - // flusher's destructor will call connection_.FlushPackets, which should - // get a WRITE_STATUS_ERROR from the writer and ignore it. - } - EXPECT_EQ(original_max_packet_length, connection_.max_packet_length()); - EXPECT_FALSE(connection_.connected()); - EXPECT_THAT(saved_connection_close_frame_.quic_error_code, - IsError(QUIC_PACKET_WRITE_ERROR)); + // Ignore PACKET_WRITE_ERROR once. + { + QuicConnection::ScopedPacketFlusher flusher(&connection_); + // flusher's destructor will call connection_.FlushPackets, which should + // get a WRITE_STATUS_ERROR from the writer and ignore it. } + EXPECT_EQ(original_max_packet_length, connection_.max_packet_length()); + EXPECT_TRUE(connection_.connected()); + + // Close connection on another PACKET_WRITE_ERROR. + EXPECT_CALL(visitor_, OnConnectionClosed(_, _)) + .WillOnce(Invoke(this, &QuicConnectionTest::SaveConnectionCloseFrame)); + { + QuicConnection::ScopedPacketFlusher flusher(&connection_); + // flusher's destructor will call connection_.FlushPackets, which should + // get a WRITE_STATUS_ERROR from the writer and ignore it. + } + EXPECT_EQ(original_max_packet_length, connection_.max_packet_length()); + EXPECT_FALSE(connection_.connected()); + EXPECT_THAT(saved_connection_close_frame_.quic_error_code, + IsError(QUIC_PACKET_WRITE_ERROR)); } // Simulate the case where the first attempt to send a probe is write blocked,