Skip to content

Improve schema metadata error messages and recovery logs - #18937

Open
Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:improve-schema-metadata-diagnostics
Open

Caideyipi wants to merge 2 commits into
apache:masterfrom
Caideyipi:improve-schema-metadata-diagnostics

Conversation

@Caideyipi

Copy link
Copy Markdown
Collaborator

Description

Creating a timeseries with an invalid SDT time such as compmintime=invalid lets a NumberFormatException escape, while a negative time is incorrectly reported as a formatting error. Template RPC failures also omit the template name or transport failure, and metadata recovery logs lack useful context.

  • Report malformed and overflowing SDT times as user ILLEGAL_PARAMETER errors. Include the property name, rejected value, and timeseries path; preserve the negative-value explanation and report both time bounds for an invalid range.
  • Report the template name and ConfigNode failure reason for template RPC errors. Preserve the transport exception as a suppressed exception so query error handling can still find the IoTDBException status and contextual message at the root.
  • Include the measurement name, database, SchemaRegion, tag offset, and exception in tag-index recovery failures. Snapshot callbacks run before measurements are attached to their parents, so the old path could omit the device. Carry SchemaRegion recovery context in the exception and let the recovery collector log it once.
  • Log optional SDT time defaults at DEBUG with their effective values, and update the English and Chinese message catalogs together.

Validation

  • Full-reactor mvn test-compile -DskipTests and mvn test-compile -P with-zh-locale -DskipTests: passed (53 modules each).
  • MetaFormatUtilsTest, ClusterTemplateManagerTest, DataNodeSchemaMessagesZhFormatTest, and SchemaEngineTest: passed in both locales (12 tests per locale).
  • SchemaRegionManagementTest#testRatisModeSnapshot*+testEmptySnapshot*: passed in the ZH build (8 parameterized snapshot tests across Memory and PBTree modes).
  • Spotless and git diff --check: passed. All 329 EN/ZH schema-message keys and format placeholders match; the four changed production classes were checked for the corresponding inlined message literals in each locale.

This PR has:

  • been self-reviewed.
  • added unit tests or modified existing tests to cover new code paths.
  • added comments explaining the intent where it is not obvious.

Key changed classes: MetaFormatUtils, ClusterTemplateManager, SchemaEngine, SchemaRegionMemoryImpl, and the EN/ZH DataNodeSchemaMessages catalogs.

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.

2 participants