Skip to content

Remove deprecated DruidException, EntryExistsException#14448

Merged
kfaraz merged 11 commits intoapache:masterfrom
kfaraz:remove_deprecated_exception
Mar 15, 2024
Merged

Remove deprecated DruidException, EntryExistsException#14448
kfaraz merged 11 commits intoapache:masterfrom
kfaraz:remove_deprecated_exception

Conversation

@kfaraz
Copy link
Copy Markdown
Contributor

@kfaraz kfaraz commented Jun 20, 2023

Changes:

  • Remove deprecated DruidException (old one) and EntryExistsException
  • Use newly added comprehensive DruidException instead
  • Update error message in SqlMetadataStorageActionHandler when max packet limit is violated.
  • Factor out common code from several faults into BaseFault.
  • Slightly update javadoc in DruidException to render it correctly
  • Remove unused classes SegmentToMove, SegmentToDrop
  • Move ServletResourceUtils from module druid-processing to druid-server and add utility method to build error Response from DruidException.

Release Notes

The old EntryExistsException thrown when trying to insert a duplicate task in the metadata store has been removed. Instead, Druid now throws a DruidException with error code entryAlreadyExists.


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.

@github-actions
Copy link
Copy Markdown

This pull request has been marked as stale due to 60 days of inactivity.
It will be closed in 4 weeks if no further activity occurs. If you think
that's incorrect or this pull request should instead be reviewed, please simply
write any comment. Even if closed, you can still revive the PR at any time or
discuss it on the dev@druid.apache.org list.
Thank you for your contributions.

@github-actions github-actions Bot added the stale label Feb 13, 2024
@kfaraz kfaraz removed the stale label Feb 23, 2024
@kfaraz kfaraz requested a review from abhishekrb19 March 14, 2024 06:28
Copy link
Copy Markdown
Contributor

@abhishekrb19 abhishekrb19 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the cleanup! Since the deprecation of exception classes were noted in the 27.0.0 release notes, should we add a release note entry in this PR to mention that classes have now been removed, so it gets called out in the next release notes?

private List<DataSegment> createBaseSegments()
{
return Arrays.asList(
createSegment("base", "2015-01-01T00Z/2015-01-02T00Z", "2015-01-02"),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe save the base datasource name in a constant as it's used in quite a few places.

@@ -257,10 +237,13 @@ public void testDuplicateInsertThrowsEntryExistsException()
Map<String, Object> status = ImmutableMap.of("count", 42);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This test name needs updating as the exception no longer exists: testDuplicateInsertThrowsEntryExistsException

@kfaraz
Copy link
Copy Markdown
Contributor Author

kfaraz commented Mar 15, 2024

Thanks for the review, @abhishekrb19 !
I will address your comments in a follow up PR.

Thanks for reminding me about the release notes. I will update the PR description.

@kfaraz kfaraz merged commit 466057c into apache:master Mar 15, 2024
@kfaraz kfaraz deleted the remove_deprecated_exception branch March 15, 2024 15:59
@adarshsanjeev adarshsanjeev added this to the 30.0.0 milestone May 6, 2024
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.

3 participants