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 sharded table #266

Open
donhardman opened this issue Apr 29, 2024 · 2 comments
Open

DROP sharded table #266

donhardman opened this issue Apr 29, 2024 · 2 comments
Assignees

Comments

@donhardman
Copy link
Contributor

donhardman commented Apr 29, 2024

We should add functionality to support dropping shared tables. The command should clean up everything associated with the shared table. To make this happen, we should start with a special command DROP SHARDED TABLE. After that, we'll migrate to use the DROP TABLE command, while the daemon should detect if it's a shared table or not and process the request accordingly.

This requires modifications on the daemon side, so we'll start with the DROP SHARDED TABLE syntax first.

@donhardman donhardman changed the title Create issues about DROP SHARDED TABLE and a special flag to ease routing of a DROP TABLE to Buddy DROP sharded table Apr 29, 2024
@donhardman donhardman self-assigned this Apr 29, 2024
@donhardman
Copy link
Contributor Author

It was implemented in these two pull requests:

During the implementation of the DROP SHARDED TABLE logic, a requirement also arose to refactor our old system with hooks. As a result, I made changes in the core and placed code in the appropriate locations. The QueryProcessor is now much cleaner, and the common logic for using processors of each plugin has become clearer.

@donhardman
Copy link
Contributor Author

donhardman commented Sep 24, 2024

Merged into the main.

@PavelShilin89 let's add tests.

We should cover that DROP SHARDED TABLE x works fine for both single sharded and clustered environment.

That means just implement various check that executes DROP SHARTED TABLE x for different tables (also not sharded) and make sure that it works ONLY for those that sharded

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

3 participants