You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When rocksdb_copies table gets transformed into disc_copies table in a single node environment, all the records of the table disappear. This can be seen from the following test case:
Start Erlang single node with mnesia_rocksdb in libs. Do the following:
Note that after table is transformed to disc_copies, the records (at least the first one) are still in it. They are available until the node is restarted.
Also note that two lines are commented out. I'll explain that later.
Restart the node and do the following:
mnesia:start(),
ok = mnesia:wait_for_tables([schema, ?TABLE_NAME], 10000),
a = mnesia:dirty_first(?TABLE_NAME),
The last line throws an exception: "no match of right hand side value '$end_of_table'". Therefore, the table is empty.
If however the table is converted to ram_copies and only after that to disc_copies, everything works as expected: the table is not cleared. To demonstrate this, use the same code, but uncomment the two lines above.
The text was updated successfully, but these errors were encountered:
If an 'external copy' is involved, data is dumped to a log file, unless the target is ram_copies, in which case the ets table is created and then filled directly at commit. This would help explain why you get different results by going via ram_copies.
It's strange. I've ran into the same issue on OTP 26.2 on several different machines (my local computer - Debian Bookworm Linux and on server using Oracle Enterprise Linux 9). I then also tried using OTPs 26.1, 26.1.2 (the one you used) and 27.0.1 (the newest stable) on my local computer and I can still reliably reproduce the problem. Might that be related to OS?...
Thanks for your help. I'll try to register it as mnesia issue.
When
rocksdb_copies
table gets transformed intodisc_copies
table in a single node environment, all the records of the table disappear. This can be seen from the following test case:mnesia_rocksdb
in libs. Do the following:Note that after table is transformed to
disc_copies
, the records (at least the first one) are still in it. They are available until the node is restarted.Also note that two lines are commented out. I'll explain that later.
The last line throws an exception: "no match of right hand side value '$end_of_table'". Therefore, the table is empty.
The definitions are as follows:
If however the table is converted to
ram_copies
and only after that todisc_copies
, everything works as expected: the table is not cleared. To demonstrate this, use the same code, but uncomment the two lines above.The text was updated successfully, but these errors were encountered: