[ 
https://issues.apache.org/jira/browse/IGNITE-29189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nikolay Izhikov resolved IGNITE-29189.
--------------------------------------
    Resolution: Won't Fix

> Read cpMapSnapshot.bin written by builds with the generated 
> EarliestCheckpointMapSnapshot serializer
> ----------------------------------------------------------------------------------------------------
>
>                 Key: IGNITE-29189
>                 URL: https://issues.apache.org/jira/browse/IGNITE-29189
>             Project: Ignite
>          Issue Type: Improvement
>            Reporter: Nikolay Izhikov
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> h3. Context
> IGNITE-29185 made {{EarliestCheckpointMapSnapshot}} write and read 
> {{cpMapSnapshot.bin}} in the layout used by 2.17 / 2.18 (UUIDs written with 
> {{writeObject}}).
> Builds that contain IGNITE-27775 but not IGNITE-29185 (no release, but 
> intermediate master builds) wrote the file with the generated 
> {{EarliestCheckpointMapSnapshotSerializer}}, where UUID map keys and 
> {{checkpointIds}} elements are written with {{U.writeUuid}} (null flag + two 
> longs). Such a file can't be read by the current code, so a node upgraded 
> from one of these builds logs "Failed to unmarshal earliest checkpoint map 
> snapshot" and rebuilds the earliest checkpoint map.
> h3. Proposal
> Support both layouts on read: {{readExternal}} reads the payload bytes once, 
> tries the legacy layout first and, if that fails, re-reads the same bytes 
> with a copy of the generated code. The legacy parse of a generated-layout 
> payload fails deterministically ({{StreamCorruptedException}}: the first byte 
> of a {{U.writeUuid}} UUID is 0x00/0x01, never a valid type code), so the 
> fallback is safe. Writing stays in the legacy layout.
> Covered by {{EarliestCheckpointMapSnapshotSerializationTest}} (round trip, 
> legacy layout with 2.17 and 2.18 headers, generated layout, empty snapshot) 
> and {{CheckpointMapSnapshotCompatibilityTest}}.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to