Skip to content

Cherry pick #101891 to 26.1: Fix UDF registry loss during Keeper session expiry - #102026

Merged
robot-ch-test-poll1 merged 12 commits into
backport/26.1/101891from
cherrypick/26.1/101891
Apr 8, 2026
Merged

robot-ch-test-poll1 merged 12 commits into
backport/26.1/101891from
cherrypick/26.1/101891

Conversation

@robot-ch-test-poll

Copy link
Copy Markdown
Contributor

Original pull-request #101891

Do not merge this PR manually

This pull-request is a first step of an automated backporting.
It contains changes similar to calling git cherry-pick locally.
If you intend to continue backporting the changes, then resolve all conflicts if any.
Otherwise, if you do not want to backport them, then just close this pull-request.

The check results does not matter at this step - you can safely ignore them.

Troubleshooting

If the conflicts were resolved in a wrong way

If this cherry-pick PR is completely screwed by a wrong conflicts resolution, and you want to recreate it:

  • delete the pr-cherrypick label from the PR
  • delete this branch from the repository

You also need to check the Original pull-request for pr-backports-created label, and delete if it's presented there

The PR source

The PR is created in the CI job

fm4v added 11 commits April 6, 2026 23:13
When refreshObjects() loads UDFs from ZooKeeper and the session expires
mid-loop, tryLoadObject() was catching the exception and returning nullptr.
The partially-loaded set was then passed to setAllObjects(), which replaced
the entire in-memory registry — causing all UDFs that failed to load to
become UNKNOWN_FUNCTION until the next successful refresh cycle.

The fix has two parts:

1. tryLoadObject() now re-throws Keeper hardware errors (session expired,
   connection loss) instead of silently returning nullptr. Non-hardware
   errors and parse failures still return nullptr as before.

2. refreshObjects() now uses ZooKeeperRetriesControl to retry the entire
   load loop on Keeper hardware errors with exponential backoff
   (200ms initial, 5s max, 10 retries). setAllObjects() is only called
   after a fully successful load. If all retries are exhausted, the
   exception propagates to the caller and the existing registry is
   preserved intact.
…eper-session-expiry

Fix UDF registry loss during Keeper session expiry
@robot-ch-test-poll robot-ch-test-poll added pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only! do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default labels Apr 8, 2026
@robot-ch-test-poll1
robot-ch-test-poll1 merged this pull request into backport/26.1/101891 Apr 8, 2026
@robot-ch-test-poll1
robot-ch-test-poll1 deleted the cherrypick/26.1/101891 branch April 8, 2026 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not test disable testing on pull request pr-bugfix Pull request with bugfix, not backported by default pr-cherrypick Cherry-pick of merge-commit before backporting. Do not use manually - automated use only!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants