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

Verify that we cannot alter or change the sharded table from the user side (only Buddy) #206

Open
donhardman opened this issue Feb 7, 2024 · 3 comments
Assignees

Comments

@donhardman
Copy link
Contributor

donhardman commented Feb 7, 2024

When we create a sharded table with Buddy, we must ensure that users are not allowed to directly alter, modify, or delete this table.

These operations should be performed exclusively by Buddy because the table is distributed and contains multiple shards. To maintain consistency in the sharding mechanism, users can only read and write. Alterations should only be allowed through the Buddy process and method we designate.

This issue is currently blocked by: manticoresoftware/manticoresearch#1423

@sanikolaev
Copy link
Collaborator

When we create a sharded table with Buddy, we must ensure that users are not allowed to directly alter, modify, or delete this table.

Sounds like this should fail:

create table t shards=2;
drop table t;

but why would it have to fail?

@sanikolaev
Copy link
Collaborator

This issue is currently blocked by: manticoresoftware/manticoresearch#1803

Why is this issue blocked by that?

@donhardman
Copy link
Contributor Author

We could implement the drop table feature with Buddy by adding a protection mechanism on the daemon side. This mechanism would throw an error if we try to modify a table without Buddy's involvement. Since the operation is routed through Buddy, it can perform all the necessary actions to maintain consistency when removing it.

Before, we were planning to use the DROP SHARDED TABLE syntax, but based on our latest discussion, it seems we could stick with the default syntax.

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

No branches or pull requests

3 participants