[
https://issues.apache.org/jira/browse/HUDI-6688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ethan Guo updated HUDI-6688:
----------------------------
Description:
The completed rollback in data table's timeline interferes with the partition
validation in the metadata table validator. Only commits should be considered
in the validation. See the following example.
Timeline of DT and MDT:
{code:java}
╔═════╤═══════════════════╤═════════════╤═══════════╤═══════════════════╤═════════════╤═════════════╤═════════════╤═════════════╤═══════════╤═════════════╤═════════════╤═════════════╗
║ No. │ Instant │ Action │ State │ Rollback Info │
Requested │ Inflight │ Completed │ MT │ MT │ MT
│ MT │ MT ║
║ │ │ │ │ │ Time
│ Time │ Time │ Action │ State │ Requested │
Inflight │ Completed ║
║ │ │ │ │ │
│ │ │ │ │ Time │
Time │ Time ║
╠═════╪═══════════════════╪═════════════╪═══════════╪═══════════════════╪═════════════╪═════════════╪═════════════╪═════════════╪═══════════╪═════════════╪═════════════╪═════════════╣
║ 0 │ 00000000000000010 │ - │ - │ - │ -
│ - │ - │ deltacommit │ COMPLETED │ 08-11 23:59 │
08-11 23:59 │ 08-11 23:59 ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 1 │ 00000000000000011 │ - │ - │ - │ -
│ - │ - │ deltacommit │ COMPLETED │ 08-11 23:59 │
08-11 23:59 │ 08-11 23:59 ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 2 │ 20230812065907463 │ deltacommit │ INFLIGHT │ Rolled back by │ 08-11
23:59 │ 08-12 00:00 │ - │ - │ - │ - │ -
│ - ║
║ │ │ │ │ 20230812070238150 │
│ │ │ │ │ │
│ ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 3 │ 20230812070238150 │ rollback │ INFLIGHT │ Rolls back │ 08-12
00:02 │ 08-12 00:02 │ - │ - │ - │ - │ -
│ - ║
║ │ │ │ │ 20230812065907463 │
│ │ │ │ │ │
│ ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 4 │ 20230812070241429 │ - │ - │ - │ -
│ - │ - │ rollback │ COMPLETED │ 08-12 00:02 │
08-12 00:02 │ 08-12 00:02 ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 5 │ 20230812070351902 │ deltacommit │ REQUESTED │ - │ 08-12
00:04 │ - │ - │ - │ - │ - │ -
│ - ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 6 │ 20230812070532879 │ deltacommit │ REQUESTED │ - │ 08-12
00:06 │ - │ - │ - │ - │ - │ -
│ - ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 7 │ 20230812070605364 │ rollback │ COMPLETED │ Rolls back │ 08-12
00:06 │ 08-12 00:06 │ 08-12 00:06 │ deltacommit │ COMPLETED │ 08-12 00:06 │
08-12 00:06 │ 08-12 00:06 ║
║ │ │ │ │ 20230812070205857 │
│ │ │ │ │ │
│ ║
╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
║ 8 │ 20230812070606670 │ - │ - │ - │ -
│ - │ - │ rollback │ COMPLETED │ 08-12 00:06 │
08-12 00:06 │ 08-12 00:06 ║
╚═════╧═══════════════════╧═════════════╧═══════════╧═══════════════════╧═════════════╧═════════════╧═════════════╧═════════════╧═══════════╧═════════════╧═════════════╧═════════════╝
{code}
The partition metadata:
{code:java}
2023/06/24/.hoodie_partition_metadata
#partition metadata
#Sat Aug 12 07:00:21 UTC 2023
commitTime=20230812065907463
partitionDepth=3
{code}
Validator throws the exception:
> Fix partition validation to only consider commits in metadata table validator
> -----------------------------------------------------------------------------
>
> Key: HUDI-6688
> URL: https://issues.apache.org/jira/browse/HUDI-6688
> Project: Apache Hudi
> Issue Type: Bug
> Reporter: Ethan Guo
> Assignee: Ethan Guo
> Priority: Blocker
> Fix For: 0.14.0
>
>
> The completed rollback in data table's timeline interferes with the partition
> validation in the metadata table validator. Only commits should be
> considered in the validation. See the following example.
> Timeline of DT and MDT:
> {code:java}
> ╔═════╤═══════════════════╤═════════════╤═══════════╤═══════════════════╤═════════════╤═════════════╤═════════════╤═════════════╤═══════════╤═════════════╤═════════════╤═════════════╗
> ║ No. │ Instant │ Action │ State │ Rollback Info │
> Requested │ Inflight │ Completed │ MT │ MT │ MT
> │ MT │ MT ║
> ║ │ │ │ │ │
> Time │ Time │ Time │ Action │ State │ Requested
> │ Inflight │ Completed ║
> ║ │ │ │ │ │
> │ │ │ │ │ Time │
> Time │ Time ║
> ╠═════╪═══════════════════╪═════════════╪═══════════╪═══════════════════╪═════════════╪═════════════╪═════════════╪═════════════╪═══════════╪═════════════╪═════════════╪═════════════╣
> ║ 0 │ 00000000000000010 │ - │ - │ - │ -
> │ - │ - │ deltacommit │ COMPLETED │ 08-11 23:59 │
> 08-11 23:59 │ 08-11 23:59 ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 1 │ 00000000000000011 │ - │ - │ - │ -
> │ - │ - │ deltacommit │ COMPLETED │ 08-11 23:59 │
> 08-11 23:59 │ 08-11 23:59 ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 2 │ 20230812065907463 │ deltacommit │ INFLIGHT │ Rolled back by │
> 08-11 23:59 │ 08-12 00:00 │ - │ - │ - │ -
> │ - │ - ║
> ║ │ │ │ │ 20230812070238150 │
> │ │ │ │ │ │
> │ ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 3 │ 20230812070238150 │ rollback │ INFLIGHT │ Rolls back │
> 08-12 00:02 │ 08-12 00:02 │ - │ - │ - │ -
> │ - │ - ║
> ║ │ │ │ │ 20230812065907463 │
> │ │ │ │ │ │
> │ ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 4 │ 20230812070241429 │ - │ - │ - │ -
> │ - │ - │ rollback │ COMPLETED │ 08-12 00:02 │
> 08-12 00:02 │ 08-12 00:02 ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 5 │ 20230812070351902 │ deltacommit │ REQUESTED │ - │
> 08-12 00:04 │ - │ - │ - │ - │ -
> │ - │ - ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 6 │ 20230812070532879 │ deltacommit │ REQUESTED │ - │
> 08-12 00:06 │ - │ - │ - │ - │ -
> │ - │ - ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 7 │ 20230812070605364 │ rollback │ COMPLETED │ Rolls back │
> 08-12 00:06 │ 08-12 00:06 │ 08-12 00:06 │ deltacommit │ COMPLETED │ 08-12
> 00:06 │ 08-12 00:06 │ 08-12 00:06 ║
> ║ │ │ │ │ 20230812070205857 │
> │ │ │ │ │ │
> │ ║
> ╟─────┼───────────────────┼─────────────┼───────────┼───────────────────┼─────────────┼─────────────┼─────────────┼─────────────┼───────────┼─────────────┼─────────────┼─────────────╢
> ║ 8 │ 20230812070606670 │ - │ - │ - │ -
> │ - │ - │ rollback │ COMPLETED │ 08-12 00:06 │
> 08-12 00:06 │ 08-12 00:06 ║
> ╚═════╧═══════════════════╧═════════════╧═══════════╧═══════════════════╧═════════════╧═════════════╧═════════════╧═════════════╧═══════════╧═════════════╧═════════════╧═════════════╝
> {code}
> The partition metadata:
> {code:java}
> 2023/06/24/.hoodie_partition_metadata
> #partition metadata
> #Sat Aug 12 07:00:21 UTC 2023
> commitTime=20230812065907463
> partitionDepth=3
> {code}
> Validator throws the exception:
--
This message was sent by Atlassian Jira
(v8.20.10#820010)