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
My assumption was that the Dbi object would be created once and then can be used from any thread (using relevant read/write transactions). I based this on the docs here:
Generally databases should only be opened once, by the first transaction in the process. After the first transaction completes, the database handles can freely be used by all subsequent transactions
If this is the case then there is a bug due to compKeyA and compKeyB being fields in Dbi and thus shared across users of Dbi. This code shows how a reader will lead to corrupt inserts of sequential keys when Dbi is shared. It feels like the reusable buffers should be coupled with the txn object, but I cannot see a good way of achieving this in the current form.
My assumption was that the
Dbiobject would be created once and then can be used from any thread (using relevant read/write transactions). I based this on the docs here:If this is the case then there is a bug due to
compKeyAandcompKeyBbeing fields inDbiand thus shared across users ofDbi. This code shows how a reader will lead to corrupt inserts of sequential keys whenDbiis shared. It feels like the reusable buffers should be coupled with thetxnobject, but I cannot see a good way of achieving this in the current form.