Add an overridable table-config-change callback distinct from index-loading-config fetch#18792
Conversation
…oading-config fetch The server's table-config/schema refresh message handler previously called fetchIndexLoadingConfig() purely for its cache-refresh side effect, discarding the returned config. That same fetchIndexLoadingConfig() is also invoked incidentally during segment state transitions and reloads, so there was no way for a table data manager to distinguish "the config actually changed" from "an index loading config was fetched while a transition was in progress". Introduce a dedicated onTableConfigOrSchemaRefresh() callback on TableDataManager (default implementation refreshes the cached table config and schema, preserving today's behavior) and invoke it from the refresh message handler instead of fetchIndexLoadingConfig(). This gives table data managers a hook that fires only on a genuine config/schema change, while leaving the behavior of fetchIndexLoadingConfig() during transitions unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
krishan1390
left a comment
There was a problem hiding this comment.
No blocking issues found in review.
|
Minor (non-blocking): the concrete |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #18792 +/- ##
============================================
+ Coverage 64.78% 64.80% +0.01%
Complexity 1309 1309
============================================
Files 3380 3380
Lines 209630 209634 +4
Branches 32822 32822
============================================
+ Hits 135817 135843 +26
+ Misses 62883 62860 -23
- Partials 10930 10931 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…oading-config fetch (apache#18792)
The server's table-config/schema refresh message handler called
fetchIndexLoadingConfig()purely for its cache-refresh side effect, discarding the returned config. That samefetchIndexLoadingConfig()is also invoked incidentally during segment state transitions and reloads, so a table data manager had no way to distinguish "the config actually changed" from "an index loading config was fetched while a transition was in progress."This adds a dedicated
onTableConfigOrSchemaRefresh()callback onTableDataManager. The default implementation refreshes the cached table config and schema (preserving today's behavior), and the refresh message handler now invokes the callback instead offetchIndexLoadingConfig(). The behavior offetchIndexLoadingConfig()during transitions is unchanged. This gives implementations a hook that fires only on a genuine config/schema change.Testing
BaseTableDataManagerTest#testOnTableConfigOrSchemaRefreshRefreshesCachedConfigverifies the default callback refreshes the cached config/schema. Existing data-manager and server tests pass.🤖 Generated with Claude Code