Skip to content

Fix thread-unsafe emitter usage in SeekableStreamSupervisorStateTest.#12658

Merged
gianm merged 1 commit intoapache:masterfrom
gianm:fix-sssst-emitter
Jun 23, 2022
Merged

Fix thread-unsafe emitter usage in SeekableStreamSupervisorStateTest.#12658
gianm merged 1 commit intoapache:masterfrom
gianm:fix-sssst-emitter

Conversation

@gianm
Copy link
Copy Markdown
Contributor

@gianm gianm commented Jun 15, 2022

The TestEmitter is used from different threads without concurrency control. This patch makes the emitter thread-safe.

I think this fixes #12649, since:

  1. Without the patch, the test generally fails once every 10–20 runs on my machine. With the patch, I've done 200 runs and it hasn't failed yet.
  2. It's believable that the ConcurrentModificationException is due to the thread-unsafe emitter.

The TestEmitter is used from different threads without concurrency
control. This patch makes the emitter thread-safe.
Copy link
Copy Markdown
Contributor

@cryptoe cryptoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!

@gianm gianm merged commit 4d89248 into apache:master Jun 23, 2022
@gianm gianm deleted the fix-sssst-emitter branch June 23, 2022 05:29
@abhishekagarwal87 abhishekagarwal87 added this to the 24.0.0 milestone Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky Test: SeekableStreamSupervisorStateTest.testEmitRecordLag

4 participants