Skip to content

Update Curator to 5.3.0 - #12939

Merged
clintropolis merged 10 commits into
apache:masterfrom
dampcake:curator-5.3.0
Aug 27, 2022
Merged

clintropolis merged 10 commits into
apache:masterfrom
dampcake:curator-5.3.0

Conversation

@dampcake

@dampcake dampcake commented Aug 23, 2022 •

Copy link
Copy Markdown
Contributor

Description

Update Apache Curator to the latest version, 5.3.0. This version drops support for ZooKeeper 3.4 but Druid has already officially dropped support in 0.22. Further Curator has removed support for Exhibitor so all related configurations and tests have been removed in this PR as well. This should make is simple to keep up to date with bug fixes and patches released by the Curator team.


Key changed/added classes in this PR
  • server/src/main/java/org/apache/druid/curator/inventory/CuratorInventoryManager.java
    Removed call to clear() as this is no longed exposed and is handled inside the close() below.

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • 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.

@gianm

gianm commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

Tagged "Incompatible" since a feature (Exhibitor integration) is being removed. Given the state of Exhibitor — it seems to be mostly maintainerless for the last few years — I don't think this is a problem. But it should still be noted.

@gianm

gianm commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

One reason this upgrade is especially interesting is that it claims to fix https://issues.apache.org/jira/browse/CURATOR-638, a bug that people run into when ZK servers change IPs. This is relatively common in virtualized and containerized environments.

@gianm gianm left a comment

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.

LGTM 🚀

@dampcake

Copy link
Copy Markdown
Contributor Author

I am not sure if https://issues.apache.org/jira/browse/CURATOR-538 is fixed in this version as it says it's targeting 5.4.0 which is still unreleased. There are a couple other bugs people might be hitting in containerized environments as well such as:

Though making this update will get us other fixes and should make it easier to keep up to date with the 5.x releases.

@gianm

gianm commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

Ah, nevermind! Well, it won't actually fix CURATOR-638 then. But, as you point out, it'll make it easier for us to get the fix when Curator 5.4 is out. Which is still good.

@gianm

gianm commented Aug 24, 2022

Copy link
Copy Markdown
Contributor

@dampcake Could you merge master into your branch, please? For Travis to run successfully the branch needs to pull in a .travis.yml update from #12368.

@paul-rogers

Copy link
Copy Markdown
Contributor

Sorry, the failure is due to a recent Travis change that introduced a "silent" merge conflict. Due to that change, please rebase this PR on the latest master to pick up the newest Travis file.

// This close() call actually calls shutdownNow() on the executor registered with the Cache object, it
// better have its own executor or ignore shutdownNow() calls...
log.debug("Closing inventory cache for %s. Also removing listeners.", containerKey);
removed.getCache().getListenable().clear();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

i guess this wasn't really necessary to be there in previous version either, since it looks like the listeners got cleared there too https://github.com/apache/curator/blob/apache-curator-4.3.0/curator-recipes/src/main/java/org/apache/curator/framework/recipes/cache/PathChildrenCache.java#L378

@Override
public CountDownLatch startImmediate()
{
return null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: I looked around and don't think anything would be calling this, but maybe it would be safer to return a CountDownLatch with 0 as the count just in case anything does?

@clintropolis
clintropolis merged commit 21b73bd into apache:master Aug 27, 2022
@dampcake
dampcake deleted the curator-5.3.0 branch September 5, 2022 02:31
@dampcake dampcake mentioned this pull request Nov 2, 2022
3 tasks done
kfaraz pushed a commit that referenced this pull request Nov 21, 2022
Follow up to #12939. As noted in that PR there are a few fixes in 5.4.0 that should make running on Kubernetes more reliable. Notably:
- https://issues.apache.org/jira/browse/CURATOR-538
- https://issues.apache.org/jira/browse/CURATOR-649
@kfaraz kfaraz added this to the 25.0 milestone Nov 22, 2022
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
* Update Curator to 5.3.0

* Update licenses.yaml

* Fix inspections + add tests.

* Fix checkstyle

* Another intellij inspection fix

* Update curator exclusions

* Cleanup new exhibitor references

* Remove unused dep and checkstyle fix
riovic918data pushed a commit to riovic918data/druid that referenced this pull request Jun 12, 2026
Follow up to apache#12939. As noted in that PR there are a few fixes in 5.4.0 that should make running on Kubernetes more reliable. Notably:
- https://issues.apache.org/jira/browse/CURATOR-538
- https://issues.apache.org/jira/browse/CURATOR-649
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.

5 participants