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

Fix encoded taskId check in chatHandlerResource #7520

Merged
merged 2 commits into from
Apr 21, 2019

Conversation

jihoonson
Copy link
Contributor

@jihoonson jihoonson commented Apr 20, 2019

ChatHandler is an interface to provide RESTful APIs and some tasks are using it to communicate with other Druid modules. When a chatHanlder API is called, ChatHandlerResource checks the current running task is the expected callee. Before 0.14, it checked taskId as it is, but after #6761, it encodes taskId before comparing it. This breaks the backwards compatibility, especially when middleManagers of different versions are running in the same cluster. If taskId doesn't match, ChatHandlerResource returns null which just returns NOT_FOUND error (404) with no message which makes debugging harder.

This PR fixes the compatibility issue and improves ChatHandlerResource to return BAD_REQUEST error with a proper message when taskId doesn't match.

@gianm
Copy link
Contributor

gianm commented Apr 20, 2019

Some of the CI failures look legit, including org.apache.druid.indexing.kafka.KafkaIndexTaskClientTest.testTaskLocationMismatch

@gianm gianm added this to the 0.15.0 milestone Apr 20, 2019
Copy link
Contributor

@gianm gianm 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 c60e7fe into apache:master Apr 21, 2019
gianm pushed a commit to implydata/druid-public that referenced this pull request Apr 21, 2019
* Fix encoded taskId check in chatHandlerResource

* fix tests
clintropolis pushed a commit that referenced this pull request Apr 24, 2019
* Fix encoded taskId check in chatHandlerResource

* fix tests
@clintropolis clintropolis modified the milestones: 0.15.0, 0.14.1 Apr 24, 2019
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.

None yet

3 participants