File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed
ydb/library/actors/interconnect Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,12 @@ namespace NActors {
260260 }
261261 }
262262
263- SetEnoughCpu (enoughCpu);
263+ if (enoughCpu) {
264+ SetEnoughCpu (true );
265+ StarvingInRow = 0 ;
266+ } else {
267+ SetEnoughCpu (++StarvingInRow < StarvingInRowForNotEnoughCpu);
268+ }
264269
265270 // calculate ping time
266271 auto it = std::min_element (PingQ.begin (), PingQ.end ());
Original file line number Diff line number Diff line change @@ -402,9 +402,10 @@ namespace NActors {
402402
403403 if (!canProducePackets && !canWriteData) {
404404 SetEnoughCpu (true ); // we do not starve
405+ StarvingInRow = 0 ;
405406 break ;
406407 } else if (TimeLimit->CheckExceeded ()) {
407- SetEnoughCpu (false );
408+ SetEnoughCpu (++StarvingInRow < StarvingInRowForNotEnoughCpu );
408409 IssueRam (false );
409410 break ;
410411 }
Original file line number Diff line number Diff line change 3333#include < unordered_map>
3434
3535namespace NActors {
36+
37+ static constexpr ui64 StarvingInRowForNotEnoughCpu = 32 ;
38+
3639 class TSlowPathChecker {
3740 using TTraceCallback = std::function<void (double )>;
3841 TTraceCallback Callback;
@@ -299,6 +302,8 @@ namespace NActors {
299302 std::array<ui32, 16 > InputTrafficArray;
300303 THashMap<ui16, ui32> InputTrafficMap;
301304
305+ ui64 StarvingInRow = 0 ;
306+
302307 bool CloseInputSessionRequested = false ;
303308
304309 void CloseInputSession ();
@@ -634,6 +639,8 @@ namespace NActors {
634639 bool StartHandshakeOnSessionClose = false ;
635640
636641 ui64 EqualizeCounter = 0 ;
642+
643+ ui64 StarvingInRow = 0 ;
637644 };
638645
639646 class TInterconnectSessionKiller
You can’t perform that action at this time.
0 commit comments