Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-unique node instance_id will be duplicated #787

Closed
wangxye opened this issue Dec 4, 2023 · 0 comments · Fixed by #798
Closed

Non-unique node instance_id will be duplicated #787

wangxye opened this issue Dec 4, 2023 · 0 comments · Fixed by #798
Assignees

Comments

@wangxye
Copy link
Contributor

wangxye commented Dec 4, 2023

situation:

  1. For a node entity, its name is uniquely indexed while instance_id is not;
  2. As a result, there will be cases with the same name but different instance_ids;

mysql:

mysql> select * from node;
+----+---------------------------------------+------------------------------+-----------+----------+--------+-------------------+-------+---------------------+---------------------+
| id | name                                  | instance_id                  | volume_id | hostname | vpc_id | address           | epoch | create_time         | update_time         |
+----+---------------------------------------+------------------------------+-----------+----------+--------+-------------------+-------+---------------------+---------------------+
|  1 | automq-automq-for-rocketmq-broker-0   | automq-for-rocketmq-broker-0 | NULL      | NULL     | NULL   | 192.168.0.124:8081 |     0 | 2023-11-10 01:30:37 | 2023-11-26 14:43:15 |
|  2 | automq-automq-for-rocketmq-broker-1   | automq-for-rocketmq-broker-1 | NULL      | NULL     | NULL   | 192.168.5.36:8081  |     0 | 2023-11-10 01:30:38 | 2023-11-26 14:43:34 |
|  3 | automq-for-rocketmq-rocketmq-broker-0 | rocketmq-broker-0            | NULL      | NULL     | NULL   | 192.168.4.209:8081 |     0 | 2023-11-30 03:14:48 | 2023-12-04 08:58:39 |
+----+---------------------------------------+------------------------------+-----------+----------+--------+-------------------+-------+---------------------+---------------------+

broker log:

java.sql.SQLIntegrityConstraintViolationException: Duplicate entry 'automq-for-rocketmq-rocketmq-broker-0' for key 'node.idx_name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant