twitter / scalding

A Scala API for Cascading
http://twitter.com/scalding
Apache License 2.0
3.48k stars 704 forks source link

Fix a race condition in `JobTest` #1895

Closed ttim closed 5 years ago

ttim commented 5 years ago

We found that when a lot of sink writes happen concurrently through Executions using JobTest you can observe data race for Buffers of tuples created.

I've created a test to show this - if you do writes to 100 sinks in parallel it breaks internals of mutable map where we store tuple buffers for each mocked source and make test infinite.

I've added a lock to fix this race condition.