Skip to content

Conversation

frncmx
Copy link
Contributor

@frncmx frncmx commented Jan 23, 2019

fixes ethersphere/swarm#1118

TestLDBStoreCollectGarbage data race fixed with locks (only needed in tests)

testLDBStoreRemoveThenCollectGarbage fails unreliably when run with -race flag. As waitGC() does not work as expected, it might just continue (not block) if GC is not
running already. We might end up with or without a chunk, depending
on goroutine scheduling. As localstore rewrite is at the finish line and this blocks
ethersphere#741 => Skip.

janos and others added 4 commits January 16, 2019 16:33
As the context parameter is not used and fixing it is not trivial,
let's rather just drop that.

Why is it not trivial?
The usual select with <-ctx.Done() would not work, as ldb.gc.runC
is always expected to have 1 element when the GC is not running.
Also: #1151
Test fails unreliably when run with `-race` flag. As waitGC() does not
work as expected, it might just continue (not block) if GC is not
running already. We might end up with or without a chunk, depending
on goroutine scheduling.

As localstore rewrite is at the finish line and this blocks
#741 => Skip.
@nonsense nonsense merged commit 3591fc6 into ethereum:master Jan 24, 2019
@frncmx frncmx deleted the race-gc-test branch January 24, 2019 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Data race in storage.testLDBStoreCollectGarbage()
3 participants