apache / incubator-pegasus

Apache Pegasus - A horizontally scalable, strongly consistent and high-performance key-value store
https://pegasus.apache.org/
Apache License 2.0
1.96k stars 310 forks source link

There's no warning message while trying to add a duplication that has been existing for the same table with the same remote cluster #2039

Closed empiredan closed 6 days ago

empiredan commented 4 weeks ago

Firstly, add a new duplication to table test2 with remote cluster target_cluster and remote table test_dup2:

>>> add_dup test2 target_cluster -a test_dup2
trying to add duplication [app_name: test2, remote_cluster_name: target_cluster, is_duplicating_checkpoint: false, remote_app_name: test_dup2, remote_replica_count: 0]
adding duplication succeed [app_name: test2, remote_cluster_name: target_cluster, appid: 6, dupid: 1717138357, is_duplicating_checkpoint: false, remote_app_name: test_dup2, remote_replica_count: 1]

>>> query_dup test2 -d
duplications of app [test2] in detail:
{"1":{"create_ts":"2024-05-31 14:52:37","dupid":1717138357,"fail_mode":"FAIL_SLOW","remote":"target_cluster","remote_app_name":"test_dup2","remote_replica_count":1,"status":"DS_LOG"},"appid":6}

Then, try to add another duplication to table test2 with remote cluster target_cluster and remote table test_dup3:

>>> add_dup test2 target_cluster -a test_dup3
trying to add duplication [app_name: test2, remote_cluster_name: target_cluster, is_duplicating_checkpoint: false, remote_app_name: test_dup3, remote_replica_count: 0]
adding duplication succeed [app_name: test2, remote_cluster_name: target_cluster, appid: 6, dupid: 1717138357, is_duplicating_checkpoint: false, remote_app_name: test_dup2, remote_replica_count: 1]
>>> query_dup test2 -d
duplications of app [test2] in detail:
{"1":{"create_ts":"2024-05-31 14:52:37","dupid":1717138357,"fail_mode":"FAIL_SLOW","remote":"target_cluster","remote_app_name":"test_dup2","remote_replica_count":1,"status":"DS_LOG"},"appid":6}

Actually there's no duplication added, since the response message has given the remote table name is test_dup2 rather than test_dup3:

adding duplication succeed [app_name: test2, remote_cluster_name: target_cluster, appid: 6, dupid: 1717138357, is_duplicating_checkpoint: false, remote_app_name: test_dup2, remote_replica_count: 1]

However, it just showed adding duplication succeed and there's not any warning message.

empiredan commented 6 days ago

This issue has been fixed by https://github.com/apache/incubator-pegasus/pull/2038.