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

Database.create can't handle disk only storage? #37

Open
dmilith opened this issue Aug 11, 2015 · 2 comments
Open

Database.create can't handle disk only storage? #37

dmilith opened this issue Aug 11, 2015 · 2 comments

Comments

@dmilith
Copy link

dmilith commented Aug 11, 2015

How can I start Amnesia in disk_only_mode ?

I tried:

Database.create disk!: [node]

with result:

Database creation failure: [error: {:bad_type, Database, :disc_only_copies, :"smalldev@MacBook-Air"}, error: {:bad_type, Database.User, :disc_only_copies, :"smalldev@MacBook-Air"}, error: {:bad_type, Database.History, :disc_only_copies, :"smalldev@MacBook-Air"}]

What i'm doing wrong?

@dmilith
Copy link
Author

dmilith commented Aug 12, 2015

I figured out, that I need to destroy (already destroyed) schema and database under console to create disk only schema. After I do that it works as expected.

@jmerriweather
Copy link

For anyone trying to create the database without the mix task and getting the same error above, I got it to work using the following:

    Amnesia.Schema.create
    Amnesia.start
    Database.create!([disk!: [node]])
    :ok = Database.wait(15000)

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