You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When different requests hitting the same endpoint _plugins/_ppl concurrently, sometimes all the requests get the same responses.
To Reproduce
Steps to reproduce the behavior:
If you curl endpoint with two different requests concurrently, sometimes you are getting correct responses, but sometimes you are getting the same response.
Debugged the ppl request around, and found the requests intaken by the channel are of different request instances but sometimes they have the same content.
Looks like the pplService does not handle the incoming request very well probably they are they are always consuming the same node client.
@mengweieric@chloe-zh Is span function merged or still in personal branch? I tried similar commands but cannot reproduce the issue locally. Could you share which OpenSearch version and branch was used? Thanks!
@dai-chen Hi Chen, the span is in personal branch, but it seems not related to the span functionality, because I didn't use the branch but also reproduced the issue. Here is the command I used with curl in cli:
@dai-chen Hi Chen, the span is in personal branch, but it seems not related to the span functionality, because I didn't use the branch but also reproduced the issue. Here is the command I used with curl in cli:
For some reason, pplRequest is field member instead of a local variable in method. Remove it and the concurrent issue seems gone. Will prepare PR once confirmed.
Activity
chloe-zh commentedon Aug 27, 2021
I reproduced this issue in my local cluster, and located the issue within the plugin:
https://github.com/opensearch-project/sql/blob/main/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java#L163
Debugged the ppl request around, and found the requests intaken by the channel are of different request instances but sometimes they have the same content.
Looks like the pplService does not handle the incoming request very well probably they are they are always consuming the same node client.
[-][BUG][/-][+]Errors when handle concurrent requests [BUG][/+]dai-chen commentedon Sep 3, 2021
@mengweieric @chloe-zh Is
spanfunction merged or still in personal branch? I tried similar commands but cannot reproduce the issue locally. Could you share which OpenSearch version and branch was used? Thanks!chloe-zh commentedon Sep 3, 2021
@dai-chen Hi Chen, the span is in personal branch, but it seems not related to the span functionality, because I didn't use the branch but also reproduced the issue. Here is the command I used with curl in cli:
chloe-zh commentedon Sep 3, 2021
@dai-chen the branch is here: https://github.com/chloe-zh/opensearch-sql/tree/observability/poc/ppl-stats
dai-chen commentedon Sep 3, 2021
Okay, I tried same command on different index but cannot reproduce the issue. Will double check the code. Thanks!
dai-chen commentedon Sep 15, 2021
The root cause seems here: https://github.com/opensearch-project/sql/blob/main/plugin/src/main/java/org/opensearch/sql/plugin/rest/RestPPLQueryAction.java#L100
For some reason,
pplRequestis field member instead of a local variable in method. Remove it and the concurrent issue seems gone. Will prepare PR once confirmed.Add Minute_Of_Hour Function As An Alias Of Minute Function (#196) (#1230
Add Minute_Of_Hour Function As An Alias Of Minute Function (#196) (#1230
[Backport 2.x] Add Minute_Of_Hour Function As An Alias Of Minute Func…
Merge pull request #1260 from penghuo/hp/2.5-release