amnesia icon indicating copy to clipboard operation
amnesia copied to clipboard

Database.create can't handle disk only storage?

Open dmilith opened this issue 10 years ago • 2 comments

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 avatar Aug 11 '15 23:08 dmilith

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.

dmilith avatar Aug 12 '15 09:08 dmilith

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)

jmerriweather avatar Jul 19 '16 10:07 jmerriweather