diff options
author | snaury <[email protected]> | 2022-07-11 21:07:37 +0300 |
---|---|---|
committer | snaury <[email protected]> | 2022-07-11 21:07:37 +0300 |
commit | 4dc0555cc39ba230a5d0024d014b77e3fd8e2209 (patch) | |
tree | 4bf0385558ad0ce52dccf295c64e683d178edd70 | |
parent | 1e6a044b49116e4a3e72eafd9efb6ef679830562 (diff) |
Fix handling of ALREADY result in ResetTablet,
-rw-r--r-- | ydb/core/tablet/tablet_req_reset.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/ydb/core/tablet/tablet_req_reset.cpp b/ydb/core/tablet/tablet_req_reset.cpp index a8cfdd5c1a5..3bc6a989aec 100644 --- a/ydb/core/tablet/tablet_req_reset.cpp +++ b/ydb/core/tablet/tablet_req_reset.cpp @@ -48,14 +48,20 @@ class TTabletReqReset : public TActorBootstrapped<TTabletReqReset> { } void Handle(TEvTabletBase::TEvBlockBlobStorageResult::TPtr& ev, const TActorContext& ctx) { - if (ev->Get()->Status == NKikimrProto::RACE) { - ++Generation; - ctx.Register(CreateTabletReqBlockBlobStorage(ctx.SelfID, TabletStorageInfo.Get(), Generation, false)); - return; - } - if (ev->Get()->Status != NKikimrProto::OK) { - return ReplyAndDie(ev->Get()->Status, ctx); + switch (ev->Get()->Status) { + case NKikimrProto::OK: + break; + + case NKikimrProto::RACE: + case NKikimrProto::ALREADY: + ++Generation; + ctx.Register(CreateTabletReqBlockBlobStorage(ctx.SelfID, TabletStorageInfo.Get(), Generation, false)); + return; + + default: + return ReplyAndDie(ev->Get()->Status, ctx); } + TTablet::ExternalWriteZeroEntry(TabletStorageInfo.Get(), Generation + 1, SelfId()); Become(&TTabletReqReset::StateWriteZeroEntry); } |