Skip to content

[rcca-25570] Handle intermediate change of status and add more log lines#305

Merged
Suraj Goel (suraj-goel) merged 1 commit into30.0.1-confluentfrom
rcca-25570-soln-1
Feb 13, 2025
Merged

[rcca-25570] Handle intermediate change of status and add more log lines#305
Suraj Goel (suraj-goel) merged 1 commit into30.0.1-confluentfrom
rcca-25570-soln-1

Conversation

@suraj-goel
Copy link
Copy Markdown
Member

@suraj-goel Suraj Goel (suraj-goel) commented Feb 13, 2025

Description

  • After Upgrade to Druid-30 in internal-metrics-prod, There are occasional failure of a task per day.
  • This is due to status changing during evaluation of if statement, Ref here
  • Logs:
Feb 12, 2025 @ 15:21:08.165	Pausing the task with state: [READING]

Feb 12, 2025 @ 15:21:08.165	Returning 409 conflict for task with state: [PAUSED]
  • To avoid this, assigned the status to a local variable and using that to evaluate if statement.
  • Added more logs to further debug if/when the issue re-occurs.

Fixed the bug ...

Renamed the class ...

Added a forbidden-apis entry ...

Release note

For tips about how to write a good release note, see Release notes.


Key changed/added classes in this PR
  • MyFoo
  • OurBar
  • TheirBaz

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@suraj-goel Suraj Goel (suraj-goel) requested a review from a team as a code owner February 13, 2025 05:04
return Response.status(Response.Status.CONFLICT)
.type(MediaType.TEXT_PLAIN)
.entity(StringUtils.format("Can't pause, task is not in a pausable state (state: [%s])", status))
.entity(StringUtils.format("Can't pause, task is not in a pausable state (state: [%s])", currentStatus))
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We can pass in both the current status and the volatile status variable here so that we can directly get it in the task error message on the UI.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I will raise a followup PR to clean-up extra logs.
will address this as part of that or the upstream fix.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sure

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Apart from the minor suggestion on passing both statuses in the error, the changes look good to me

@suraj-goel Suraj Goel (suraj-goel) merged commit 5805a03 into 30.0.1-confluent Feb 13, 2025
@suraj-goel Suraj Goel (suraj-goel) deleted the rcca-25570-soln-1 branch February 13, 2025 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants