-
Notifications
You must be signed in to change notification settings - Fork 470
Fix an exception when create and drop a table with the same name multiple times #719
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
Conversation
|
I think there are issues with the current fix. When deleting In my opinion, the root cause here is that after ZooKeeper deletes The solution is straightforward: before dropping the table, the With the current fix, which deletes partitions in the cc @luoyuxia |
|
@wuchong I think your solution may be inconsistent with current code implement. Here is the original code logic: Step 1. Create Table 1 (only created on zk node without adding to AutoPartitionManager) "The solution is straightforward: before dropping the table, the AutoPartitionManager should unregister the table id first." |
The partition node should has already been deleted in Step2, because we use So there is no need for
Yes, I agree. So we need to register it into cc @luoyuxia |
|
+1 for register into AutoPartitionManager in |
|
@zcoo @luoyuxia I reviewed the new fix and the failed cases. It seems the fix is not such easy as expected. We also need to handle the databse drop: read all the table_id of the tables in the database, which is very heavy operation. Besides, the partition node may still created under a re-created table node because a table-drop-recreate may happen in the middle of auto partition scheduling. It seems we have to tolerate the inconsistent case. Thus, I prefer a simple fix for this problem (see the PR #766), and fix the rare inconsistent case in a long-term issue #767. |
|
fixed by #766 |
Purpose
Linked issue: close #712
Brief change log
Drop table's all partitions when coordinator listens a partitioned table dropped.
Tests
API and Format
Documentation