Skip to content

Commit 6596535

Browse files
Merge d3b3bb2 into 635f97b
2 parents 635f97b + d3b3bb2 commit 6596535

File tree

8 files changed

+27
-1
lines changed

8 files changed

+27
-1
lines changed

ydb/core/tx/columnshard/columnshard__propose_transaction.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class TTxProposeTransaction : public NTabletFlatExecutor::TTransactionBase<TColu
2020
}
2121

2222
virtual bool Execute(TTransactionContext& txc, const TActorContext& ctx) override {
23+
NActors::TLogContextGuard lGuard = NActors::TLogContextBuilder::Build()("tablet_id", Self->TabletID())("tx_id", txId)("this", (ui64)this);
2324
txc.DB.NoMoreReadsForTx();
2425
NIceDb::TNiceDb db(txc.DB);
2526

@@ -61,6 +62,7 @@ class TTxProposeTransaction : public NTabletFlatExecutor::TTransactionBase<TColu
6162
}
6263

6364
virtual void Complete(const TActorContext& ctx) override {
65+
NActors::TLogContextGuard lGuard = NActors::TLogContextBuilder::Build()("tablet_id", Self->TabletID())("tx_id", txId)("this", (ui64)this);
6466
auto& record = Proto(Ev->Get());
6567
if (record.GetTxKind() == NKikimrTxColumnShard::TX_KIND_TTL) {
6668
return;

ydb/core/tx/columnshard/transactions/operators/backup.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class TBackupTransactionOperator: public IProposeTxOperator {
2727
return true;
2828
}
2929
virtual bool DoParse(TColumnShard& owner, const TString& data) override;
30+
virtual TString DoDebugString() const override {
31+
return "BACKUP";
32+
}
33+
3034
public:
3135
using TBase::TBase;
3236

ydb/core/tx/columnshard/transactions/operators/ev_write.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ namespace NKikimr::NColumnShard {
2626
virtual bool DoCheckAllowUpdate(const TFullTxInfo& currentTxInfo) const override {
2727
return (currentTxInfo.Source == GetTxInfo().Source && currentTxInfo.Cookie == GetTxInfo().Cookie);
2828
}
29+
virtual TString DoDebugString() const override {
30+
return "EV_WRITE";
31+
}
2932
virtual void DoSendReply(TColumnShard& owner, const TActorContext& ctx) override {
3033
const auto& txInfo = GetTxInfo();
3134
std::unique_ptr<NActors::IEventBase> evResult;

ydb/core/tx/columnshard/transactions/operators/long_tx_write.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ namespace NKikimr::NColumnShard {
1212
static inline auto Registrator = TFactory::TRegistrator<TLongTxTransactionOperator>(NKikimrTxColumnShard::TX_KIND_COMMIT);
1313

1414
private:
15+
virtual TString DoDebugString() const override {
16+
return "LONG_TX_WRITE";
17+
}
18+
1519
virtual TProposeResult DoStartProposeOnExecute(TColumnShard& owner, NTabletFlatExecutor::TTransactionContext& txc) override;
1620
virtual void DoStartProposeOnComplete(TColumnShard& /*owner*/, const TActorContext& /*ctx*/) override {
1721

ydb/core/tx/columnshard/transactions/operators/schema.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ namespace NKikimr::NColumnShard {
101101
}
102102
return ValidateTableSchema(preset.GetSchema());
103103
}
104+
virtual TString DoDebugString() const override {
105+
return "SCHEME:" + SchemaTxBody.DebugString();
106+
}
104107

105108
private:
106109
NKikimrTxColumnShard::TSchemaTxBody SchemaTxBody;

ydb/core/tx/columnshard/transactions/operators/sharing.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ class TSharingTransactionOperator: public IProposeTxOperator {
2828
return true;
2929
}
3030
virtual bool DoParse(TColumnShard& owner, const TString& data) override;
31+
virtual TString DoDebugString() const override {
32+
return "SHARING";
33+
}
34+
3135
public:
3236
using TBase::TBase;
3337
virtual void RegisterSubscriber(const TActorId& actorId) override {

ydb/core/tx/columnshard/transactions/tx_controller.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ void TTxController::FinishProposeOnComplete(const ui64 txId, const TActorContext
360360
}
361361

362362
void TTxController::ITransactionOperator::SwitchStateVerified(const EStatus from, const EStatus to) {
363-
AFL_VERIFY(!Status || *Status == from)("error", "incorrect expected status")("real_state", *Status)("expected", from);
363+
AFL_VERIFY(!Status || *Status == from)("error", "incorrect expected status")("real_state", *Status)("expected", from)("details", DebugString());
364364
Status = to;
365365
}
366366

ydb/core/tx/columnshard/transactions/tx_controller.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,16 @@ class TTxController {
187187
Status = {};
188188
}
189189

190+
virtual TString DoDebugString() const = 0;
191+
190192
public:
191193
using TPtr = std::shared_ptr<ITransactionOperator>;
192194
using TFactory = NObjectFactory::TParametrizedObjectFactory<ITransactionOperator, NKikimrTxColumnShard::ETransactionKind, TTxInfo>;
193195

196+
TString DebugString() const {
197+
return DoDebugString();
198+
}
199+
194200
bool CheckAllowUpdate(const TFullTxInfo& currentTxInfo) const {
195201
return DoCheckAllowUpdate(currentTxInfo);
196202
}

0 commit comments

Comments
 (0)