Transaction fails and dumps core
To replicate, run rebar3 ct --suite test/mnesia_rocksdb_SUITE --group mrdb
on https://github.com/aeternity/mnesia_rocksdb/tree/gh3553-refactor-plugin (commit d9e374d)
Or manually, using the same software (OTP 22.3.4.16 on Ubuntu 20.04.2 LTS):
EEshell V10.7.2.8 (abort with ^G)
1> mnesia:delete_schema([node()]).
ok
2> mnesia:create_schema([node()]).
ok
3> mnesia:start().
ok
4> dbg:tracer().
{ok,<0.262.0>}
5> dbg:tp(rocksdb,open,x).
{ok,[{matched,nonode@nohost,2},{saved,x}]}
6> dbg:tp(rocksdb,transaction,x).
{ok,[{matched,nonode@nohost,1},{saved,x}]}
7> dbg:p(all,[c]).
{ok,[{matched,nonode@nohost,89}]}
8>
8>
8> mnesia_rocksdb:register().
(<0.279.0>) call rocksdb:open("/home/uwiger/ae/mnesia_rocksdb/Mnesia.nonode@nohost/mnesia_rocksdb-rocksdb_copies-_db.extrdb",[{create_if_missing,true},
{cache_size,32212254},
{block_size,1024},
{max_open_files,100},
{write_buffer_size,4194304},
{compression,true},
{use_bloomfilter,true},
{create_missing_column_families,true},
{merge_operator,erlang_merge_operator}],[{"default",[{merge_operator,erlang_merge_operator}]},
{"{a,rocksdb_copies}",[{merge_operator,erlang_merge_operator}]}])
(<0.279.0>) returned from rocksdb:open/3 -> {ok,
#Ref<0.4139863266.1874198561.56860>,
[#Ref<0.4139863266.1874198561.56861>,
#Ref<0.4139863266.1874198561.56862>]}
{ok,rocksdb_copies}
9> DbRef = maps:get(db_ref, mrdb:get_ref({admin,rocksdb_copies})).
#Ref<0.4139863266.1874198561.56860>
10> rocksdb:transaction(DbRef,[]).
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)