Skip to content

Commit

Permalink
Add error messages to replication (#6708)
Browse files Browse the repository at this point in the history
  • Loading branch information
Enjection authored Jul 16, 2024
1 parent 26f1eef commit 29f1fa1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ydb/core/tx/datashard/datashard_repl_apply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,16 @@ class TDataShard::TTxApplyReplicationChanges : public TTransactionBase<TDataShar
if (Self->State != TShardState::Ready) {
Result = MakeHolder<TEvDataShard::TEvApplyReplicationChangesResult>(
NKikimrTxDataShard::TEvApplyReplicationChangesResult::STATUS_REJECTED,
NKikimrTxDataShard::TEvApplyReplicationChangesResult::REASON_WRONG_STATE);
NKikimrTxDataShard::TEvApplyReplicationChangesResult::REASON_WRONG_STATE,
TStringBuilder() << "DataShard is not ready");
return true;
}

if (!Self->IsReplicated()) {
Result = MakeHolder<TEvDataShard::TEvApplyReplicationChangesResult>(
NKikimrTxDataShard::TEvApplyReplicationChangesResult::STATUS_REJECTED,
NKikimrTxDataShard::TEvApplyReplicationChangesResult::REASON_BAD_REQUEST);
NKikimrTxDataShard::TEvApplyReplicationChangesResult::REASON_BAD_REQUEST,
TStringBuilder() << "Table is not replicated");
return true;
}

Expand Down

0 comments on commit 29f1fa1

Please sign in to comment.