Skip to content

Commit 90e3198

Browse files
The PQ tablet crashes after restarting (#9281)
1 parent 32f54d3 commit 90e3198

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ydb/core/persqueue/pq_impl.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,11 @@ void TPersQueue::ReadConfig(const NKikimrClient::TKeyValueResponse::TReadResult&
11331133

11341134
PQ_LOG_D("Load tx " << tx.ShortDebugString());
11351135

1136+
if (tx.GetState() == NKikimrPQ::TTransaction::CALCULATED) {
1137+
PQ_LOG_D("fix tx state");
1138+
tx.SetState(NKikimrPQ::TTransaction::PLANNED);
1139+
}
1140+
11361141
Txs.emplace(tx.GetTxId(), tx);
11371142

11381143
if (tx.HasStep()) {
@@ -4284,10 +4289,6 @@ void TPersQueue::CheckTxState(const TActorContext& ctx,
42844289
break;
42854290

42864291
case NKikimrPQ::TTransaction::CALCULATED:
4287-
Y_ABORT_UNLESS(tx.WriteInProgress,
4288-
"PQ %" PRIu64 ", TxId %" PRIu64,
4289-
TabletID(), tx.TxId);
4290-
42914292
tx.State = NKikimrPQ::TTransaction::WAIT_RS;
42924293
PQ_LOG_D("TxId " << tx.TxId <<
42934294
", NewState " << NKikimrPQ::TTransaction_EState_Name(tx.State));

0 commit comments

Comments
 (0)