Dm start-relay is not working, and it can even be started multiple times

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: dm start-relay没有起作用,甚至还能多次启动

| username: Jjjjayson_zeng

【TiDB Usage Environment】Production Environment / Testing / Poc
【TiDB Version】
【Reproduction Path】What operations were performed that led to the issue
【Encountered Issue: Issue Phenomenon and Impact】
【Resource Configuration】
【Attachments: Screenshots / Logs / Monitoring】


image

| username: Billmay表妹 | Original post link

Please provide as much useful information as possible~

| username: 考试没答案 | Original post link

Do you know what this means?? remote

| username: Jjjjayson_zeng | Original post link

I don’t know, please go ahead.

| username: Jjjjayson_zeng | Original post link

I understand that after I use start-relay, it will be bound. It will prompt me that it is bound.

| username: Jjjjayson_zeng | Original post link

However, after starting, it can still be started again. What is the principle behind this?

| username: Jjjjayson_zeng | Original post link

Moreover, I thought changing remote to local is done using a command, isn’t it?

| username: 考试没答案 | Original post link

I tested it in v6.1.0. Once it becomes remote, it cannot become local.

| username: 考试没答案 | Original post link

The data source can only stop-relay and start-relay. Once stopped, it means that the data will be re-fetched from the source. The task will become remote and will no longer use this relay log.

| username: 考试没答案 | Original post link

You can test it in the new version. For example, v6.5.0.

| username: Jjjjayson_zeng | Original post link

I don’t quite understand what version you are talking about. This is what it shows on my end. Can you tell me how I should check the version?

| username: 考试没答案 | Original post link

The method you are looking at is correct. However, the version is really too low. I tested v6.1.0 and it is the same as you mentioned.
image

| username: 考试没答案 | Original post link

The default value of tidb_dml_batch_size is 2000.

| username: Jjjjayson_zeng | Original post link

For example, if I want to upgrade, should I upgrade TiDB or DM?

| username: Jjjjayson_zeng | Original post link

For example, which version should I upgrade to?

| username: 考试没答案 | Original post link

There are no issues with v6.5.0. If you have purchased the service, you can consult the official website or check GitHub.

| username: Jjjjayson_zeng | Original post link

Thank you, master. I will take the time to do the upgrade in the production environment.

| username: db_user | Original post link

It seems you want to enable the start-relay function. Although it is supported in lower versions, your operation steps might be incorrect.

  1. Stop the synchronization task on the source.
    stop-task task-name
    
  2. Delete the source.
    operate-source stop source-id
    
  3. Modify the source configuration file.
    relay-dir: "./relay_log"  # Add this line to specify the relay_log directory address.
    
  4. Create the source (the newly created source will support start-relay, otherwise, you won’t have a place to put the relay-log).
    operate-source create ./a.yaml
    
  5. Resume the synchronization task.
  6. Start the start-relay.
    start-relay -s source-id worker
    
| username: Jjjjayson_zeng | Original post link

Tried it, but it didn’t work.

| username: Jjjjayson_zeng | Original post link

It’s still not working now.