Skip to content

[Fix-4564][admin] Rename physical resource files - #4569

Open
hutiefang76 wants to merge 1 commit into
DataLinkDC:devfrom
hutiefang76:codex/dinky-4564-resource-rename
Open

[Fix-4564][admin] Rename physical resource files#4569
hutiefang76 wants to merge 1 commit into
DataLinkDC:devfrom
hutiefang76:codex/dinky-4564-resource-rename

Conversation

@hutiefang76

Copy link
Copy Markdown
Contributor

Purpose

Fixes #4564.

Renaming a regular resource updated dinky_resources, but the storage move was gated on finding child rows under the file ID. Regular files do not have children, so Local/HDFS/OSS rename was never called and Flink jobs could still resolve the old physical path.

Brief change log

  • Move regular files through the configured resource manager after updating their metadata.
  • Skip the storage call when only the description changes.
  • Surface FileSystem.rename(...) == false as RESOURCE_FILE_RENAME_FAILED, so the metadata transaction can roll back.
  • Validate a missing resource before dereferencing it.
  • Add Local filesystem and HDFS failure regression tests.

The Data Studio route already queries the resource tree when it mounts with resources enabled, while its resource toolbar refreshes after successful operations. Returning from Registration Center therefore reloads the renamed resource without a separate frontend state path.

Verifying this change

  • JDK 8 / Flink 1.18 focused tests: HdfsResourceManagerTest and ResourceServiceImplTest passed.
  • JDK 8 / Flink 1.18 full dinky-admin reactor: 160 tests, 0 failures, 0 errors, 30 skipped; all 48 modules succeeded.
  • JDK 11 Spotless for dinky-admin and dinky-client-base: 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.

[Bug] [Resource Rename] Rename Resource Failed and No Exception was Throwed

1 participant