Visitar URL original
Keep dropped-table cleanup task names within the NoSQL index-key limit by kalayciburak · Pull Request #5679 · apache/polaris · GitHub
Skip to content

Keep dropped-table cleanup task names within the NoSQL index-key limit - #5679

Merged
snazy merged 1 commit into
apache:mainfrom
kalayciburak:fix/cleanup-task-name-index-key
Oct 6, 2026
Merged

snazy merged 1 commit into
apache:mainfrom
kalayciburak:fix/cleanup-task-name-index-key

Conversation

@kalayciburak

Copy link
Copy Markdown
Contributor

Dropped-table purge scheduled child tasks whose names included the full manifest or metadata path. NoSQL indexes that name and rejects keys longer than 500 UTF-8 bytes, so cleanup failed after the catalog delete had already returned 204 and the objects were left behind.

Child task names are now a task kind, the parent task id, and a UUID. The paths stay in the task payload, which is what the cleanup handlers read. A duplicate name is not required for correctness: the UUID already makes the name unique, and a later duplicate deletion exits when the file is already gone.

Fixes #5658

Checklist

Test plan

  • JAVA_HOME=21 ./gradlew :polaris-runtime-service:test --tests org.apache.polaris.service.task.TableCleanupTaskHandlerNoSqlTest --tests org.apache.polaris.service.task.TableCleanupTaskHandlerTest
  • Before the change, the NoSQL test failed with IllegalArgumentException: Key too long, max allowed length: 500 while creating the child tasks.
  • After the change, both classes passed.
  • ./gradlew :polaris-runtime-service:spotlessCheck :polaris-runtime-service:checkstyleMain :polaris-runtime-service:checkstyleTest

Copilot AI balanced review requested due to automatic review settings October 2, 2026 10:04

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

snazy
snazy previously approved these changes Oct 2, 2026

@snazy snazy left a comment

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.

Thanks for the quick turnaround!

The change LGTM!
Approving, assuming CI passes.

dimas-b
dimas-b previously approved these changes Oct 3, 2026

@dimas-b dimas-b 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.

Thanks for the fix, @kalayciburak !

Child cleanup tasks put the full manifest or metadata path in the entity
name. NoSQL rejects index keys longer than 500 UTF-8 bytes, so purge
failed after the catalog delete had already returned 204.

Names are now a task kind, the parent task id, and a UUID. The paths
stay in the task payload.

Fixes apache#5658
@snazy
snazy merged commit e23a9b7 into apache:main Oct 6, 2026
24 checks passed
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.

Table purge cleanup fails on NoSQL when child task names exceed the 500-byte index-key limit

6 participants