maedhroz commented on code in PR #4620:
URL: https://github.com/apache/cassandra/pull/4620#discussion_r2880337520


##########
test/simulator/main/org/apache/cassandra/simulator/ClusterSimulation.java:
##########
@@ -654,8 +682,68 @@ public ClusterSimulation(RandomSource random, long seed, 
int uniqueNum,
 
         execution = new SimulatedExecution();
 
+        // Track randomized configuration for consolidated logging
+        Map<String, String> randomizedConfig = new LinkedHashMap<>();
+        randomizedConfig.put("nodes", String.valueOf(numOfNodes));
+        randomizedConfig.put("dcs", String.valueOf(numOfDcs));
+
+        // Log replication factors
+        StringBuilder rfString = new StringBuilder();
+        for (int i = 0; i < numOfDcs; ++i)
+        {
+            if (i > 0)
+                rfString.append(",");
+            rfString.append("dc").append(i).append(":").append(initialRf[i]);
+        }
+        randomizedConfig.put("replication_factors", rfString.toString());
+
+        // Randomize memtable type
+        String memtableType;
+        if (builder.memtableType != null)
+        {
+            memtableType = builder.memtableType;
+        }
+        else
+        {
+            String[] memtableTypes = {"TrieMemtable", "SkipListMemtable"};
+            memtableType = memtableTypes[random.uniform(0, 
memtableTypes.length)];
+        }
+        randomizedConfig.put("memtable", memtableType);
+
+        // Randomize memtable allocation type (heap-based only to avoid 
InterruptibleChannel issues with offheap)
+        String memtableAllocationType;
+        if (builder.memtableAllocationType != null)
+        {
+            memtableAllocationType = builder.memtableAllocationType;
+        }
+        else
+        {
+            String[] allocationTypes = {
+                "heap_buffers",           // Slab allocator (pooled memory)
+                "unslabbed_heap_buffers"  // Direct heap allocation (no 
pooling)

Review Comment:
   Ah, I see the comment now. I guess we don't have a choice for now.



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