erlang / otp

Erlang/OTP
http://erlang.org
Apache License 2.0
11.17k stars 2.92k forks source link

mnesia:add_backend_type(Alias, Module) after,mnesia:install_fallback("bk.BUP") error #8045

Open axpxp opened 5 months ago

axpxp commented 5 months ago

Describe the bug mnesia:add_backend_type(Alias, Module) after,If the table is empty,Everything is fine,because Module:init_backend first call. mnesia:add_backend_type(Alias, Module) after,If there's data in the table,mnesia:backup("bk.BUP") after mnesia:install_fallback("bk.BUP") after mnesia:start(),There will be bugs,because Module:init_backend not call.

To Reproduce mnesia_rocksdb:create_schema([node()]), mnesia:start(), mnesia:add_backend_type(Type, Module) mnesia:create_table(Name, [{Type, [node()]}), insert some datas, mnesia:backup("bk.BUP") mnesia:install_fallback("bk.BUP") mnesia:start()---Error reported here

Expected behavior Backup works fine, thank you

Affected versions OTP 25 26.

Additional context

axpxp commented 5 months ago

If you don't understand anything, feel free to ask me. I check online every day

axpxp commented 5 months ago

@IngelaAndin please help,thanks.

IngelaAndin commented 5 months ago

@axpxp Well yes it seems like you found a bug in an area of the code that is not much used (at least not by us). Of course it would be nice to get it fixed, but unfortunately it will not be a high priority for us.

MarkoMin commented 4 months ago

@axpxp What module are you using in mnesia:add_backend_type/2? Can you paste error message you get?

axpxp commented 4 months ago

@axpxp What module are you using in mnesia:add_backend_type/2? Can you paste error message you get?

erlang fallback execution sequence error

axpxp commented 4 months ago

@IngelaAndin I have sorted out the test code and can send it to you. As long as you test it, you will know. Please help me, thank you very much

axpxp commented 1 month ago

@IngelaAndin Please help,thank you.

axpxp commented 1 month ago

mnesia_test_erlang27_reload.zip

erlang version:otp_win64_27.0

1,click this file: ___start.bat 2,run this code: mnesia_rocksdb_fallback:run().

click this file to make: ___make.bat

@dgud @Mikaka27 I just uploaded a new compressed package again, please check, thank you

IngelaAndin commented 1 month ago

@axpxp There is a plan for some of my co-workers to start looking at this. I see you already had some communication.

axpxp commented 1 month ago

@axpxp There is a plan for some of my co-workers to start looking at this. I see you already had some communication.

Thank you very, very much