livepeer / livepeer/go-livepeer

Fix data race condition due to synchronization in HandlePush tests

Open
#2,179 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: icebox type: tech debt
Dominant language
Go
Stars
586
Forks
226
Avg merge
1d 17h
Merged PRs (30d)
19

Description

See https://github.com/livepeer/go-livepeer/issues/2145#issuecomment-1002971675

The relevant tests are in https://github.com/livepeer/go-livepeer/blob/970d0aa7892cd9c30aaf069a7ee8e72d8fa64111/server/push_test.go.

We may want to look into refactoring these tests altogether as it sounds like the way synchronization is currently handled is problematic and will lead to data race conditions when running with go test -race.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with server/push_test.go and the linked synchronization discussion, then run the relevant tests with go test -race. Trace how the HandlePush tests synchronize their work and identify the data race. Done means the tests retain their coverage and pass without race reports.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.