File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
transactions/operators/ev_write Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -316,16 +316,17 @@ class TCommitOperation {
316316 LockId = lock.GetLockId ();
317317 SendingShards = std::set<ui64>(locks.GetSendingShards ().begin (), locks.GetSendingShards ().end ());
318318 ReceivingShards = std::set<ui64>(locks.GetReceivingShards ().begin (), locks.GetReceivingShards ().end ());
319- const bool singleShardTx = SendingShards.empty () && ReceivingShards.empty ();
320- if (!singleShardTx) {
319+ if (SendingShards.empty () != ReceivingShards.empty ()) {
320+ return TConclusionStatus::Fail (" incorrect synchronization data (send/receiving lists)" );
321+ }
322+ if (ReceivingShards.size () && SendingShards.size ()) {
321323 if (!ReceivingShards.contains (TabletId) && !SendingShards.contains (TabletId)) {
322- return TConclusionStatus::Fail (" shard is absent in sending and receiving lists" );
324+ return TConclusionStatus::Fail (" shard is incorrect for sending/ receiving lists" );
323325 }
324- if (locks.HasArbiterColumnShard ()) {
325- ArbiterColumnShard = locks.GetArbiterColumnShard ();
326- } else {
327- AFL_VERIFY (!ReceivingShards.empty ());
326+ if (!locks.HasArbiterColumnShard ()) {
328327 ArbiterColumnShard = *ReceivingShards.begin ();
328+ } else {
329+ ArbiterColumnShard = locks.GetArbiterColumnShard ();
329330 }
330331 AFL_VERIFY (ArbiterColumnShard);
331332 }
Original file line number Diff line number Diff line change @@ -159,7 +159,8 @@ class TEvWriteCommitPrimaryTransactionOperator: public TEvWriteCommitSyncTransac
159159 };
160160
161161 virtual bool IsTxBroken () const override {
162- return TxBroken.value_or (false );
162+ AFL_VERIFY (TxBroken);
163+ return *TxBroken;
163164 }
164165
165166 void InitializeRequests (TColumnShard& owner) {
You can’t perform that action at this time.
0 commit comments