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

drop rule, but rule config in memory not drop #33134

Open
dobet opened this issue Oct 6, 2024 · 1 comment
Open

drop rule, but rule config in memory not drop #33134

dobet opened this issue Oct 6, 2024 · 1 comment

Comments

@dobet
Copy link

dobet commented Oct 6, 2024

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details.
If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

5.5.0
etcd

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

proxy cluster

Expected behavior

drop an rule, and the config can recreate

Actual behavior

ERROR 10200 (44000): Invalid 'Readwrite-splitting' rules 'group0', error messages are: [group0] already exists in storage unit

Reason analyze (If you can)

rule config also alive in memory.

I debug the code, but the

public void renew(final DropRuleItemEvent event)

not access.

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

mysql>create readwrite_splitting rule group0 (WRITE_STORAGE_UNIT=ds_0, READ_STORAGE_UNITS(ds_1));

mysql> show readwrite_splitting rules\G
*************************** 1. row ***************************
                             name: group0
          write_storage_unit_name: ds_0
          read_storage_unit_names: ds_1
transactional_read_query_strategy: DYNAMIC
               load_balancer_type: 
              load_balancer_props: 
1 row in set (0.04 sec)

mysql> drop readwrite_splitting rule group0;
Query OK, 0 rows affected (0.01 sec)

mysql> show readwrite_splitting rules\G
Empty set (0.00 sec)

mysql> create readwrite_splitting rule group0 (WRITE_STORAGE_UNIT=ds_0, READ_STORAGE_UNITS(ds_1));
ERROR 10200 (44000): Invalid 'Readwrite-splitting' rules 'group0', error messages are: [group0] already exists in storage unit

Example codes for reproduce this issue (such as a github link).

@dobet dobet changed the title dop rule, but rule config in memory drop rule, but rule config in memory not drop Oct 6, 2024
@terrymanu
Copy link
Member

It seems that only ETCD is causing issues, and currently, ZooKeeper is used more frequently.
If ZooKeeper cannot be used as a substitute for ETCD, I would like to ask if there are any volunteers willing to investigate this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants