Skip to content

Commit abaad21

Browse files
authored
Merge 90f2f80 into 346aedc
2 parents 346aedc + 90f2f80 commit abaad21

File tree

4 files changed

+408
-65
lines changed

4 files changed

+408
-65
lines changed

ydb/core/blobstorage/dsproxy/dsproxy_put.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,9 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor {
646646
<< " Tactic# " << TEvBlobStorage::TEvPut::TacticName(Tactic)
647647
<< " RestartCounter# " << RestartCounter);
648648

649+
TInstant firstDeadline = TInstant::Max();
649650
for (size_t blobIdx = 0; blobIdx < PutImpl.Blobs.size(); ++blobIdx) {
651+
firstDeadline = std::min(firstDeadline, PutImpl.Blobs[blobIdx].Deadline);
650652
LWTRACK(DSProxyPutBootstrapStart, PutImpl.Blobs[blobIdx].Orbit);
651653
}
652654

@@ -667,7 +669,9 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor {
667669
getTotalSize()
668670
);
669671

670-
Become(&TBlobStorageGroupPutRequest::StateWait, TDuration::MilliSeconds(DsPutWakeupMs), new TKikimrEvents::TEvWakeup);
672+
TInstant now = TActivationContext::Now();
673+
TInstant wakeupTime = std::min(now + TDuration::MilliSeconds(DsPutWakeupMs), firstDeadline);
674+
Become(&TBlobStorageGroupPutRequest::StateWait, wakeupTime, new TKikimrEvents::TEvWakeup);
671675

672676
PartSets.resize(PutImpl.Blobs.size());
673677
for (auto& partSet : PartSets) {
@@ -721,7 +725,7 @@ class TBlobStorageGroupPutRequest : public TBlobStorageGroupRequestActor {
721725
const TInstant now = TActivationContext::Now();
722726
TPutImpl::TPutResultVec putResults;
723727
for (size_t blobIdx = 0; blobIdx < PutImpl.Blobs.size(); ++blobIdx) {
724-
if (!PutImpl.Blobs[blobIdx].Replied && now > PutImpl.Blobs[blobIdx].Deadline) {
728+
if (!PutImpl.Blobs[blobIdx].Replied && now >= PutImpl.Blobs[blobIdx].Deadline) {
725729
PutImpl.PrepareOneReply(NKikimrProto::DEADLINE, blobIdx, LogCtx, "Deadline timer hit", putResults);
726730
}
727731
}

ydb/core/blobstorage/dsproxy/dsproxy_request.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ namespace NKikimr {
425425
.ExecutionRelay = ev->Get()->ExecutionRelay
426426
}
427427
}),
428-
TInstant::Max()
428+
ev->Get()->Deadline
429429
);
430430
}
431431

0 commit comments

Comments
 (0)