Skip to content
This repository was archived by the owner on Nov 24, 2022. It is now read-only.
This repository was archived by the owner on Nov 24, 2022. It is now read-only.

Transaction Conflict in tests #56

@merlinran

Description

@merlinran

This happens in tests here as well as the auction system CI

setting proposal cid: committing txn: Transaction Conflict. Please retry

It's caused by a race between txn.Commit at https://github.com/textileio/bidbot/blob/main/service/store/store.go#L372 and the call to s.saveAndTransitionStatus in the fetch worker https://github.com/textileio/bidbot/blob/main/service/store/store.go#L615 which triggered by sending to jobCh https://github.com/textileio/bidbot/blob/main/service/store/store.go#L536

In reality it shouldn't be a problem because it takes some time to download and import data, but the mocked calls return immediately, allow them to run nearly the same time.

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