Skip to content

Commit af6695c

Browse files
committed
Improve wakeup scheduling in TEvPut
1 parent c4b96cf commit af6695c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ydb/core/blobstorage/dsproxy/dsproxy_put.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -728,8 +728,9 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor {
728728
PutImpl.PrepareOneReply(NKikimrProto::DEADLINE, blobIdx, LogCtx, "Deadline timer hit", putResults);
729729
}
730730
}
731-
ReplyAndDieWithLastResponse(putResults);
732-
ScheduleWakeup();
731+
if (!ReplyAndDieWithLastResponse(putResults)) {
732+
ScheduleWakeup();
733+
}
733734
}
734735

735736
void UpdatePengingVDiskResponseCount(const TDeque<TPutImpl::TPutEvent>& putEvents) {
@@ -801,12 +802,11 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor {
801802
while (!PutDeadlines.empty()) {
802803
TInstant deadline = *PutDeadlines.begin();
803804
PutDeadlines.erase(PutDeadlines.begin());
804-
if (deadline > now) {
805+
if (deadline > now && deadline != TInstant::Max()) {
805806
Schedule(deadline, new TKikimrEvents::TEvWakeup);
806807
return;
807808
}
808809
}
809-
Schedule(TDuration::MilliSeconds(DsPutWakeupMs), new TKikimrEvents::TEvWakeup);
810810
}
811811

812812
STATEFN(StateWait) {

0 commit comments

Comments
 (0)