diff --git a/pkg/sink/codec/open/codec.go b/pkg/sink/codec/open/codec.go index 073713b46..18e43b8cb 100644 --- a/pkg/sink/codec/open/codec.go +++ b/pkg/sink/codec/open/codec.go @@ -44,6 +44,9 @@ func encodeRowChangedEvent(e *commonEvent.RowEvent, config *common.Config, large keyWriter.WriteStringField("tbl", e.TableInfo.GetTableName()) keyWriter.WriteIntField("t", int(common.MessageTypeRow)) + if largeMessageOnlyHandleKeyColumns { + keyWriter.WriteBoolField("ohk", true) + } if claimCheckLocationName != "" { keyWriter.WriteBoolField("ohk", false) keyWriter.WriteStringField("ccl", claimCheckLocationName) diff --git a/tests/integration_tests/open_protocol_handle_key_only/run.sh b/tests/integration_tests/open_protocol_handle_key_only/run.sh index 6be9ec9c2..b8544208e 100644 --- a/tests/integration_tests/open_protocol_handle_key_only/run.sh +++ b/tests/integration_tests/open_protocol_handle_key_only/run.sh @@ -20,7 +20,7 @@ function run() { cd $WORK_DIR - TOPIC_NAME="open-protocol-handle-key-only" + TOPIC_NAME="open-protocol-handle-key-only-$RANDOM" # record tso before we create tables to skip the system table DDLs start_ts=$(run_cdc_cli_tso_query ${UP_PD_HOST_1} ${UP_PD_PORT_1})