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

Transaction Conflict in tests #56

Open
merlinran opened this issue Oct 1, 2021 · 0 comments
Open

Transaction Conflict in tests #56

merlinran opened this issue Oct 1, 2021 · 0 comments

Comments

@merlinran
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant