nsivabalan commented on code in PR #19205:
URL: https://github.com/apache/hudi/pull/19205#discussion_r3654608822
##########
hudi-common/src/main/java/org/apache/hudi/common/table/HoodieTableConfig.java:
##########
@@ -327,12 +328,31 @@ public static final String getDefaultPayloadClassName() {
.noDefaultValue()
.withDocumentation("Base path of the dataset that needs to be
bootstrapped as a Hudi table");
+ /**
+ * @deprecated since 1.3.0, use {@link #META_FIELDS_MODE} instead. {@code
true} maps to
+ * {@link MetaFieldsMode#ALL} and {@code false} maps to {@link
MetaFieldsMode#NONE}. This property
+ * is still honored for tables written before {@code
hoodie.meta.fields.mode} existed, but it is
+ * consulted only when the mode property is absent.
+ */
+ @Deprecated
Review Comment:
Good catch — there was none. Added in
[`4134dac`](https://github.com/apache/hudi/pull/19205/commits/4134dac62257).
**Upgrade (9 → 10)** — `NineToTenUpgradeHandler` now records the mode
derived from the legacy boolean (`true -> ALL`, `false -> NONE`). Version 9
tables predate the property, so this just makes the on-disk state explicit and
matches what freshly created version 10 tables write; behavior is identical
either way. It never rewrites `populate.meta.fields`.
**Downgrade (10 → 9)** — `TenToNineDowngradeHandler` drops
`hoodie.meta.fields.mode`, since version 9 cannot interpret it, and
deliberately leaves `hoodie.populate.meta.fields` exactly as it stands. `ALL`
and `NONE` therefore round-trip unchanged — those are precisely the two states
the legacy boolean can express, so those tables are bit-identical afterwards.
Selective modes can't be represented in version 9. Rather than blocking the
downgrade, it proceeds and logs a warning that the table will behave as `NONE`
to version 9 readers and that incremental queries relying on the mode will stop
returning rows. Already-written files keep their populated meta columns
regardless — this only changes how the table advertises itself. Note the
degradation direction is the safe one: since the persisted boolean is `false`
for every selective mode (after the fix for your other P1), a version 9 reader
under-claims rather than assuming meta columns that aren't there.
Tests: new `TestNineToTenUpgradeHandler` covers both derived values and
asserts the legacy boolean is untouched; `TestTenToNineDowngradeHandler`
asserts the mode is deleted while `populate.meta.fields` is neither deleted nor
rewritten. Full `Test*Upgrade*` / `Test*Downgrade*` suite passes (76 tests).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]