Details
-
Bug
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
Correctness - Unrecoverable Corruption / Loss
-
Critical
-
Normal
-
Fuzz Test
-
All
-
None
Description
Found by CASSANDRA-18504
When converting the BB to comparable bytes, converting back returns a different set of bytes for OSS42
java.lang.AssertionError: Property falsified after 18 example(s) Smallest found falsifying value(s) :- Type: decimal Values: [-9.05674E-92] Cause was :- org.junit.ComparisonFailure: [fromComparableBytes(asComparableBytes(bb)) != bb; version OSS42] expected:<"0000006[1f22e36]"> but was:<"0000006[2ff75ce1c]">
EDIT:
After more testing and talking with blambov, this is expected behavior and been this way since at least 3.0 (didn't test further back). The new compare as bytes methods are only matching existing semantics, and the issue itself is that when we try to compare this type, we "normalize" it, which mutates the value; this normalization is not well documented and should be more explicit to users