@@ -980,29 +980,6 @@ void WritableStreamInternalController::increaseCurrentWriteBufferSize(
980980 KJ_IF_SOME (highWaterMark, maybeHighWaterMark) {
981981 int64_t amount = highWaterMark - currentWriteBufferSize;
982982 updateBackpressure (js, amount <= 0 );
983- // If the current buffer size is greater than or equal to double the high water mark,
984- // let's emit a warning about excessive backpressure.
985- // TODO(later): For the standard stream, we use a variable multiplier if the highWaterMark
986- // is < 10 because the default high water mark is 1 and we don't want to emit the warning
987- // too often. For internal streams, tho, there is no default high water mark and the user
988- // would have to provide one... and since these are always bytes it would make sense
989- // for the user to specify a larger value here in the typical case... so I decided to go with
990- // the fixed 2x multiplier. However, I can make this variable too if folks feel the consistency
991- // is important.
992- if (warnAboutExcessiveBackpressure && (currentWriteBufferSize >= 2 * highWaterMark)) {
993- excessiveBackpressureWarningCount++;
994- auto warning = kj::str (" A WritableStream is experiencing excessive backpressure. "
995- " The current write buffer size is " ,
996- currentWriteBufferSize,
997- " bytes, which is greater than or equal to double the high water mark "
998- " of " ,
999- highWaterMark,
1000- " bytes. Streams that consistently exceed the "
1001- " configured high water mark may cause excessive memory usage. " ,
1002- " (Count " , excessiveBackpressureWarningCount, " )" );
1003- js.logWarning (warning);
1004- warnAboutExcessiveBackpressure = false ;
1005- }
1006983 }
1007984}
1008985
@@ -1028,7 +1005,6 @@ void WritableStreamInternalController::updateBackpressure(jsg::Lock& js, bool ba
10281005 }
10291006
10301007 // When backpressure is updated and is false, we resolve the ready promise on the writer
1031- warnAboutExcessiveBackpressure = true ;
10321008 maybeResolvePromise (js, writerLock.getReadyFulfiller ());
10331009 }
10341010}
0 commit comments