nielifeng opened a new pull request, #11465:
URL: https://github.com/apache/seatunnel/pull/11465

   ### Purpose
   
   Fixes #11462.
   
   `IMapFileData.compareTo` never returned `0` when timestamps were equal. This 
violates the `Comparable` contract and can make `Collections.sort` fail in WAL 
read paths. The same implementation also existed in `IMapData`.
   
   ### Changes
   
   - Add a shared comparison helper for IMap WAL data.
   - Order records by timestamp descending.
   - For identical timestamps, order delete records before put records so WAL 
read de-duplication does not keep stale values ahead of tombstones.
   - Add stable key/value tie-breakers so truly equal records return `0`.
   - Add regression tests covering ordering, antisymmetry, equality, and 
sorting many equal-timestamp records.
   
   ### Tests
   
   - `./mvnw spotless:apply`
   - `./mvnw -pl 
seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file
 -Dtest=IMapFileDataCompareToTest test`
   - `./mvnw -pl 
seatunnel-engine/seatunnel-engine-storage/imap-storage-plugins/imap-storage-file
 verify`
   
   Note: full `./mvnw -q -DskipTests verify` initially failed on DNS while 
downloading Node.js from nodejs.org; after retrying with network access it ran 
for a long time without output and was manually stopped. Module-level 
verification for the affected component passed.
   


-- 
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]

Reply via email to