Skip to content

[Hotfix] Fix optimizer group not updated on table refresh#4076

Open
j1wonpark wants to merge 1 commit intoapache:masterfrom
j1wonpark:fix/fix-table-refresh
Open

[Hotfix] Fix optimizer group not updated on table refresh#4076
j1wonpark wants to merge 1 commit intoapache:masterfrom
j1wonpark:fix/fix-table-refresh

Conversation

@j1wonpark
Copy link
Contributor

Why are the changes needed?

When the self-optimizing.group property of a table is changed (either directly or through catalog default settings), the group_name column in the table_runtime database table is not updated during table refresh. This causes:

  1. Tables remain bound to the old optimizer group even after configuration changes
  2. handleConfigChanged() uses stale group_name from DB for queue binding
  3. Tables get stuck in pending status permanently when the original optimizer group no longer exists

Root Cause: DefaultTableRuntime.refresh() method was missing updateGroup() call in the store transaction.

Brief change log

  • DefaultTableRuntime.java: Added updateGroup(g -> newGroupName) call in refresh() method to update the group_name column in DB when optimizer group changes
  • TestDefaultTableRuntimeHandler.java: Added testRefreshUpdatesOptimizerGroup() test to verify that getGroupName() returns the new group name after refresh

How was this patch tested?

  • Add some test cases that check the changes thoroughly including negative and positive cases if possible

  • Add screenshots for manual tests if appropriate

  • Run test locally before making a pull request

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

Signed-off-by: j1wonpark <jpark92@outlook.kr>
@github-actions github-actions bot added the module:ams-server Ams server module label Feb 5, 2026
Copy link
Contributor

@czy006 czy006 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module:ams-server Ams server module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants