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

[FEATURE] Allow sourceDir to be inside data directory #73

Open
2ban opened this issue Sep 4, 2023 · 3 comments
Open

[FEATURE] Allow sourceDir to be inside data directory #73

2ban opened this issue Sep 4, 2023 · 3 comments
Assignees
Labels

Comments

@2ban
Copy link

2ban commented Sep 4, 2023

Is your feature request related to a problem? Please describe.
When running restore with import we need to set sourceDir that is not inside data directory. This is difficult if cassandra is in kubernetes and it already has been mounted to volume. We cannot re-mount cassandra directory to subPath as this will require moving all cassandra data files one level down.

Describe the solution you'd like
A possibility to import restore data to directory inside cassandra data folder. Or any alternatives that could resolve this problem.

Describe alternatives you've considered
Re-mounting Cassandra to subPath, and another subPath dir for restore imports.
Attaching additional volume to cassandra - this will work but looks like overhead when we want to store backups on s3 but still need additional local storage.

Additional context
Condition that prevents from importing to dir inside of data dir.
(https://github.com/instaclustr/esop/blob/master/src/main/java/com/instaclustr/esop/impl/restore/RestoreOperationRequest.java#L358)

@smiklosovic
Copy link
Collaborator

Interesting. Thanks for reporting this. I should spend some time on this tool in a week or two. Stay tuned.

@2ban
Copy link
Author

2ban commented Dec 7, 2023

hi, @smiklosovic , any updates on this?

@smiklosovic
Copy link
Collaborator

smiklosovic commented Dec 8, 2023

@2ban could you give me the error you possibly get if you remove that condition here? Have you tried to do that without that if? Please do this on version you are running, do not take the code from master branch or similar. We need to be as close to what version you are running as possible and we will see how far we get. I think it is also important to test this on a node which is isolated from everything else (some testing node you can throw away) in case something goes wrong.

Also, don't you have some kind of a temporary directory in Kubernetes? /tmp? Why not to put it there? I do not know what Cassandra version you are running but if you use importing strategy instead of hardlinking, then after it is downloaded, it should be loaded via JMX to live Cassandra data dir path from /tmp (it does not need to be on the same block device as it has to be in case of hardlinking).

https://github.com/instaclustr/esop/blob/master/src/main/java/com/instaclustr/esop/impl/restore/RestoreOperationRequest.java#L358

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

No branches or pull requests

2 participants