Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Internal: concurrency issue in rest and action filter chains #7021

Closed
javanna opened this Issue Jul 24, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@javanna
Copy link
Member

commented Jul 24, 2014

A test failure (TransportActionFilterChainTests#testTooManyContinueProcessing) revealed a concurrency issue in both rest filter chain and action filter chain. We use a volatile int to keep track of the current position in the chain, which might get incremented from concurrent threads. volatile is not enough if the filters call continueProcessing concurrently.

@javanna javanna added the bug label Jul 24, 2014

@javanna javanna self-assigned this Jul 24, 2014

@javanna javanna changed the title Concurrency issue in rest and action filter chains Internal: concurrency issue in rest and action filter chains Jul 24, 2014

@javanna javanna added v1.4.0 and removed bug labels Jul 24, 2014

javanna added a commit to javanna/elasticsearch that referenced this issue Jul 28, 2014

Internal: use AtomicInteger instead of volatile int for the current a…
…ction filter position

Also improved filter chain tests to not rely on execution time, and made filter chain tests look more similar to what happens in reality by removing multiple threads creation in testTooManyContinueProcessing (something we don't support anyway, makes little sense to test it).

Closes elastic#7021

javanna added a commit that referenced this issue Jul 28, 2014

Internal: use AtomicInteger instead of volatile int for the current a…
…ction filter position

Also improved filter chain tests to not rely on execution time, and made filter chain tests look more similar to what happens in reality by removing multiple threads creation in testTooManyContinueProcessing (something we don't support anyway, makes little sense to test it).

Closes #7021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.