Skip to content

Update Curator to 5.3.0#12939

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

Update Curator to 5.3.0#12939
clintropolis merged 10 commits intoapache:masterfrom
dampcake:curator-5.3.0

Conversation

@dampcake
Copy link
Copy Markdown
Contributor

@dampcake dampcake commented Aug 23, 2022

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
Copy link
Copy Markdown
Contributor

gianm commented Aug 23, 2022

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
Copy link
Copy Markdown
Contributor

gianm commented Aug 23, 2022

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.

Copy link
Copy Markdown
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 🚀

@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
Copy link
Copy Markdown
Contributor

gianm commented Aug 23, 2022

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
Copy link
Copy Markdown
Contributor

gianm commented Aug 24, 2022

@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
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
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