[Fix](user-property) Preserve legacy user properties during desrialization#65781
[Fix](user-property) Preserve legacy user properties during desrialization#65781linrrzqqq wants to merge 1 commit into
Conversation
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
|
/review |
There was a problem hiding this comment.
Automated review result: changes requested.
The production compatibility fix is correct and focused: the added plural aliases exactly match the historical image fields, the nested Gson post-process rebuilds sqlBlockRulesSplit, canonical writes remain on the short names, and the edit-log path is unaffected. One required validation issue remains in the added test.
Blocking finding:
- The legacy JSON fixture fails the mandatory FE Checkstyle gate with 13
OperatorWrapviolations; see the inline comment.
Critical checkpoint conclusions:
- Goal/correctness and proof: the aliases restore both legacy resource tags and SQL block rules through the production image-read mechanism. The unit assertions cover canonical, singular alternate, plural legacy, and SQL-rule split reconstruction, but the test source must first pass style validation.
- Scope and reuse: the production change is minimal, clear, and uses Gson's existing compatibility mechanism; no broader refactor is needed.
- Concurrency and lifecycle: no new concurrency, locks, shared mutable state, or non-intuitive lifecycle is introduced. The existing image-load lifecycle and nested post-process adapter remain unchanged.
- Configuration, compatibility, and parallel paths: no configuration or FE-BE protocol is changed. Historical plural and current short/singular names are accepted; canonical serialization is unchanged. Image loading is covered, while property edit-log replay remains an unaffected property-pair path.
- Conditions and error handling: no new conditional or error-handling path is introduced.
- Tests and results: the new JUnit 4 tests semantically target the changed behavior and no regression
.outresult is involved. Current live Checkstyle fails on the new concatenation formatting, so validation is not green. - Observability: no new runtime branch or distributed operation requires logs, metrics, or tracing.
- Persistence, transactions, and data writes: this is FE metadata image compatibility only; it changes neither transaction semantics nor edit-log payloads and introduces no data-write path.
- Performance: alias lookup is confined to deserialization and adds no meaningful hot-path cost or redundant work.
- Other issues: no additional substantiated correctness, compatibility, lifecycle, or coverage defect remains.
User focus: no additional focus points were supplied; the full PR and persistence boundary were reviewed.
Validation note: per the review-runner contract, no local build or source modification was attempted. The live Checkstyle log for the reviewed head is the authoritative failing evidence.
e5128f0 to
24d1268
Compare
|
run buildall |
TPC-H: Total hot run time: 29241 ms |
TPC-DS: Total hot run time: 177592 ms |
ClickBench: Total hot run time: 24.98 s |
FE UT Coverage ReportIncrement line coverage |
Related PR: #37243
Problem Summary:
(Before doris-3.0)Older persisted
CommonUserPropertiesJSON uses long field names such asresourceTagsandsqlBlockRules. The current serialized names arertandsbr, while the compatibility aliases only covered the singular formsresourceTagandsqlBlockRule.As a result, legacy user properties may be silently ignored during metadata
deserialization, causing resource tags or SQL block rules to be reset to their
default values.
This change adds compatibility aliases for the legacy plural field names:
resourceTagssqlBlockRules