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

[BUG] SQL running on V1 engine failed, throw exception "Request id not present in current context" #537

Closed
penghuo opened this issue Apr 5, 2022 · 0 comments
Labels
bug Something isn't working Priority-High v2.0.0

Comments

@penghuo
Copy link
Collaborator

penghuo commented Apr 5, 2022

Describe the bug

To Reproduce

  1. Enable V1 engine.
curl -H 'Content-Type: application/json' -X PUT localhost:9200/_opendistro/_sql/settings -d '{
  "persistent" : {"opendistro.sql.engine.new.enabled" : "false"}
}'
  1. Set slowlog to 0s.
curl -XPUT "http://localhost:9200/_cluster/settings" -H 'Content-Type: application/json' -d'{ 
  "persistent" : {"opendistro.sql.query.slowlog" : 0}
}'
  1. Post query, get exception.
java.lang.IllegalStateException: Request id not present in current context

Root Cause
SQL plugin use log4j ThreadContext to maintain request_id, but OpenSearch security plugin's SecurityFilter clear ThreadContext. Which cause getRequestsId call throw exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority-High v2.0.0
Projects
None yet
Development

No branches or pull requests

1 participant