Skip to content

[GH-1289] Skip child lookups for empty nodes - #1313

Open
2748109647 wants to merge 1 commit into
apache:masterfrom
2748109647:gh-1289-skip-empty-children
Open

2748109647 wants to merge 1 commit into
apache:masterfrom
2748109647:gh-1289-skip-empty-children

Conversation

@2748109647

Copy link
Copy Markdown

Fixes #1289.

When rebuilding CuratorCache, avoid issuing getChildren for a node whose Stat reports zero children. The recursive persistent watcher is registered before rebuilding, so children created after this check are still delivered as watcher events.

Adds a regression test that initializes the cache with empty nodes and verifies that a child created afterward is observed.

Validation:

  • ./mvnw -pl curator-recipes -am -Dtest=TestCuratorCache -Dsurefire.failIfNoSpecifiedTests=false test — passed (6 tests).
  • ./mvnw -pl curator-recipes spotless:check — passed.
  • git diff --check — passed.

The full reactor and a large-tree performance benchmark were not run; no quantified performance improvement is claimed.

@2748109647

Copy link
Copy Markdown
Author

Thanks for the CI signal. I checked run #39507194896: Unit tests (17) failed before Maven started, at ./mvnw clean install -DskipTests, with Could not find or load main class org.apache.maven.wrapper.MavenWrapperMain. The wrapper JAR is intentionally ignored and absent from a clean checkout; this job's wrapper bootstrap did not leave a usable JAR. The other Java/ZooKeeper jobs and the style check passed. The Maven Central wrapper JAR URL currently returns HTTP 200, which suggests a transient bootstrap/download failure, though the quiet wrapper log does not expose its exact cause. I tried rerunning failed jobs, but GitHub requires repository admin rights. Could a maintainer rerun the Java 17 job? The failure happened before compilation, so I have no source change to push for it.

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.

CuratorCache initialization overhead with many empty ZNodes

2 participants