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

Support prefix for files #8

Closed
kwando opened this issue Dec 16, 2019 · 3 comments
Closed

Support prefix for files #8

kwando opened this issue Dec 16, 2019 · 3 comments

Comments

@kwando
Copy link

kwando commented Dec 16, 2019

Have a config option that is a prefix, this way you can have multiple .cub files living in the same directory.

(I'm just tossing ideas here, feel free to disregard)

@lucaong
Copy link
Owner

lucaong commented Dec 25, 2019

Hi @kwando ,
thanks for your idea. This is technically feasible. My only concern would be around the use-case: do you have specific examples when using different directories is not advisable or not possible?

Specifying the data directory is already a form of "namespacing", and the directory will be created if it doesn't exist already. Therfore one can easily specify, for example, /some/path/db1 and /some/path/db2 as data directories for different CubDB instances. The nice thing about it, is that backing up a database is as simple as copying the latest .cub file (which is usually the only file in the directory, apart from when a compaction is running), or even the whole directory. Am I missing a use-case when it is more desirable to have multiple .cub files in the same directory?

@lucaong
Copy link
Owner

lucaong commented Feb 12, 2020

I'll close this for now, but happy to reopen it if a use-case arises.

@lucaong lucaong closed this as completed Feb 12, 2020
@kwando
Copy link
Author

kwando commented Feb 13, 2020

Yeah, it is fine like it is. I was thinking about starting a "cubdb instance" per "table" in my app to get some more concurrency out of it and I din't want to have nested directories.. but that is not a real problem :)

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

2 participants