diff options
author | alexvru <alexvru@ydb.tech> | 2023-03-24 12:03:58 +0300 |
---|---|---|
committer | alexvru <alexvru@ydb.tech> | 2023-03-24 12:03:58 +0300 |
commit | d3662522303de8956ea9e5ade412922d9dcfd29b (patch) | |
tree | b991712c5c3157f7040e4944d6a7b54f2d361414 | |
parent | 59df7664bbe19b75eb73a0e0c745a87b9269d0e3 (diff) | |
download | ydb-d3662522303de8956ea9e5ade412922d9dcfd29b.tar.gz |
Fix issue
-rw-r--r-- | ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp | 25 | ||||
-rw-r--r-- | ydb/core/blobstorage/vdisk/repl/blobstorage_repl.cpp | 4 |
2 files changed, 18 insertions, 11 deletions
diff --git a/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp b/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp index 62441b9338..c01144bb41 100644 --- a/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp +++ b/ydb/core/blobstorage/vdisk/repl/blobstorage_hullrepljob.cpp @@ -214,8 +214,8 @@ namespace NKikimr { TIntrusivePtr<TBlobStorageGroupInfo> ginfo, const TLogoBlobID &startKey, TEvReplFinished::TInfoPtr replInfo, - TBlobIdQueuePtr&& blobsToReplicatePtr, - TBlobIdQueuePtr&& unreplicatedBlobsPtr) + TBlobIdQueuePtr blobsToReplicatePtr, + TBlobIdQueuePtr unreplicatedBlobsPtr) : ReplCtx(std::move(replCtx)) , GInfo(std::move(ginfo)) , StartKey(startKey) @@ -320,8 +320,7 @@ namespace NKikimr { void Bootstrap() { STLOG(PRI_DEBUG, BS_REPL, BSVR02, VDISKP(ReplCtx->VCtx->VDiskLogPrefix, "THullReplJobActor::Bootstrap")); TimeAccount.SetState(ETimeState::PREPARE_PLAN); - auto actor = std::make_unique<THullReplPlannerActor>(ReplCtx, GInfo, StartKey, ReplInfo, - std::move(BlobsToReplicatePtr), std::move(UnreplicatedBlobsPtr)); + auto actor = std::make_unique<THullReplPlannerActor>(ReplCtx, GInfo, StartKey, ReplInfo, BlobsToReplicatePtr, UnreplicatedBlobsPtr); auto aid = RunInBatchPool(TActivationContext::ActorContextFor(SelfId()), actor.release()); ActiveActors.Insert(aid); Become(&TThis::StatePreparePlan); @@ -336,12 +335,20 @@ namespace NKikimr { auto& mon = ReplCtx->MonGroup; - Y_VERIFY_DEBUG_S(mon.ReplWorkUnitsRemaining() == -1 || ReplInfo->WorkUnitsTotal <= (ui64)mon.ReplWorkUnitsRemaining(), - "WorkUnitsTotal# " << ReplInfo->WorkUnitsTotal << " ReplWorkUnitsRemaining# " << mon.ReplWorkUnitsRemaining()); - mon.ReplWorkUnitsRemaining() = ReplInfo->WorkUnitsTotal; + if ((mon.ReplWorkUnitsRemaining() && ReplInfo->WorkUnitsTotal > (ui64)mon.ReplWorkUnitsRemaining()) || + (mon.ReplItemsRemaining() && ReplInfo->ItemsTotal > (ui64)mon.ReplItemsRemaining())) { + STLOG(PRI_WARN, BS_REPL, BSVR36, VDISKP(ReplCtx->VCtx->VDiskLogPrefix, "replication work added"), + (WorkUnitsTotal, ReplInfo->WorkUnitsTotal), + (ReplWorkUnitsRemaining, (ui64)mon.ReplWorkUnitsRemaining()), + (ItemsTotal, ReplInfo->ItemsTotal), + (ReplItemsRemaining, (ui64)mon.ReplItemsRemaining()), + (LastKey, LastKey), + (Eof, Eof), + (BlobsToReplicatePtr.size, ssize_t(BlobsToReplicatePtr ? BlobsToReplicatePtr->size() : (ssize_t)-1)), + (UnreplicatedBlobsPtr.size, UnreplicatedBlobsPtr->size())); + } - Y_VERIFY_DEBUG_S(mon.ReplItemsRemaining() == -1 || ReplInfo->ItemsTotal <= (ui64)mon.ReplItemsRemaining(), - "ItemsTotal# " << ReplInfo->ItemsTotal << " ReplItemsRemaining# " << mon.ReplItemsRemaining()); + mon.ReplWorkUnitsRemaining() = ReplInfo->WorkUnitsTotal; mon.ReplItemsRemaining() = ReplInfo->ItemsTotal; if (RecoveryMachine->NoTasks()) { diff --git a/ydb/core/blobstorage/vdisk/repl/blobstorage_repl.cpp b/ydb/core/blobstorage/vdisk/repl/blobstorage_repl.cpp index 781b9e6d82..94baa268c0 100644 --- a/ydb/core/blobstorage/vdisk/repl/blobstorage_repl.cpp +++ b/ydb/core/blobstorage/vdisk/repl/blobstorage_repl.cpp @@ -252,9 +252,9 @@ namespace NKikimr { LastReplStart = TAppData::TimeProvider->Now(); ReplCtx->MonGroup.ReplUnreplicatedVDisks() = 1; - ReplCtx->MonGroup.ReplWorkUnitsRemaining() = -1; + ReplCtx->MonGroup.ReplWorkUnitsRemaining() = 0; ReplCtx->MonGroup.ReplWorkUnitsDone() = 0; - ReplCtx->MonGroup.ReplItemsRemaining() = -1; + ReplCtx->MonGroup.ReplItemsRemaining() = 0; ReplCtx->MonGroup.ReplItemsDone() = 0; Become(&TThis::StateRepl); |