Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
lib/db: Add closeWaitGroup to allow async operation #6317
Looking into https://forum.syncthing.net/t/test-panic-on-go1-14beta1/14462 (fruitlessly) I saw lots of gc runners in the backtrace. Turns out we never close databases in tests. Closing then turns up a race in goleveldb:
Apparently it doesn't like when the db is closed while a compaction is ongoing. Easy, use the releaser in the compaction. That then more reliably brings up a race for
That's because a waitgroup is not meant for async calls to
That fixes all the races, however https://forum.syncthing.net/t/test-panic-on-go1-14beta1/14462 still occurs flakely.