skoppu22 commented on code in PR #333:
URL: https://github.com/apache/cassandra-sidecar/pull/333#discussion_r3130581411


##########
client-common/src/main/java/org/apache/cassandra/sidecar/common/data/SSTableImportOptions.java:
##########
@@ -18,21 +18,28 @@
 
 package org.apache.cassandra.sidecar.common.data;
 
-import java.util.HashMap;
+import java.util.LinkedHashMap;
 
 /**
  * Options for Cassandra import nodetool command. It is like properties.
  * Supports Json serialization and deserialization.
+ * <p>
+ * This class is used exclusively in the S3 restore job path ({@code 
CreateRestoreJobRequestPayload}).
  */
-public class SSTableImportOptions extends HashMap<String, String>
+public class SSTableImportOptions extends LinkedHashMap<String, String>

Review Comment:
   The reason is deterministic JSON serialization order. SSTableImportOptions 
is serialized into 
     the importOptions field of CreateRestoreJobRequestPayload (S3 restore job 
path). With HashMap, the JSON key order depends on hash codes and is 
unpredictable; with LinkedHashMap, keys serialize in insertion order — matching 
the put() sequence in the constructor.       



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to