Skip to content
This repository was archived by the owner on Mar 9, 2019. It is now read-only.
This repository was archived by the owner on Mar 9, 2019. It is now read-only.

Clarify transaction concurrency #392

Description

@calmh

The readme says:

Read-only transactions and read-write transactions should not depend on one another and generally shouldn't be opened simultaneously in the same goroutine. This can cause a deadlock as the read-write transaction needs to periodically re-map the data file but it cannot do so while a read-only transaction is open.

However it seems transactions are protected by an RWMutex. That means it's impossible to open a write transaction (from any goroutine) while there is a read transaction still open and vice versa; also opening new read transactions is blocked while a write transaction is waiting to begin. Am I misunderstanding how this works?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions