Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dbi not thread-safe when using comparators #127

Copy link
Copy link
@jheister

Description

@jheister
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue relates to behaviour that violates the intention of the libraryAn issue relates to behaviour that violates the intention of the library

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.