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

Prevent errors on case-insensitive filesystems #285

Open
ecton opened this issue Mar 31, 2023 · 2 comments
Open

Prevent errors on case-insensitive filesystems #285

ecton opened this issue Mar 31, 2023 · 2 comments
Milestone

Comments

@ecton
Copy link
Member

ecton commented Mar 31, 2023

If a user calls create_database with two differently cased versions of the same name on a case-insensitive filesystem, the underlying Nebari files will be "shared" -- but not in a correct way. They will overwrite each other, causing all sorts of havoc.

There are a few fixes for this. One could be to add this to the list on #251 and migrate away from using the database name in the directory -- maybe use the database id instead.

Another could be to add a check in create_database_without_schema create_database_with_schema that a folder at that path doesn't already exist. This makes the case-insensitivity be enforced by the filesystem rules -- which is understandable once you know how BonsaiDb works, but could still be a surprise to a user.

@ecton ecton added this to the v1.0 milestone Mar 31, 2023
@nerdachse
Copy link

Hey there!

I can only find create_database_with_schema or database_without_schema but not create_database_without_schema in the main branch.

Should I look elsewhere or am I missing something?

Note that I don't plan to really fix this as there is no consensus yet for which solution should be implemented, I merely am curious :)

@ecton
Copy link
Member Author

ecton commented Sep 2, 2023

Sorry for the delay, I accidentally marked the notification as read and then forgot about it!

It looks like this was just me typing from memory and calling it the wrong thing. The function I meant to reference is create_database_with_schema -- both technically have some aspect of the schema specified, one is just generic and one is the SchemaName. Perhaps I should consider renaming it to create_database_with_schema_name.

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