Copilot commented on code in PR #8014:
URL: https://github.com/apache/incubator-seata/pull/8014#discussion_r2908800606


##########
test-suite/seata-benchmark-cli/src/main/java/org/apache/seata/benchmark/model/BenchmarkMetrics.java:
##########
@@ -128,7 +128,7 @@ public LatencyStats getLatencyStats() {
             }
 
             if (latencies.isEmpty()) {
-                cachedStats = new LatencyStats(0, 0, 0, 0);
+                cachedStats = new LatencyStats(0, 0, 0, 0, 0);
             } else {
                 List<Long> sortedLatencies = new ArrayList<>(latencies);
                 Collections.sort(sortedLatencies);

Review Comment:
   `latencies` is a `Collections.synchronizedList`, but `getLatencyStats()` 
copies it via `new ArrayList<>(latencies)` without synchronizing on the list. 
This can throw `ConcurrentModificationException` or produce inconsistent 
snapshots while other threads call `addLatencySample()`. Take a snapshot under 
`synchronized (latencies)` (and ideally also do the `isEmpty()` check under the 
same lock) before sorting/calculating percentiles.



##########
changes/en-us/2.x.md:
##########
@@ -19,6 +19,8 @@ Add changes here for all PR submitted to the 2.x branch.
 <!-- Please add the `changes` to the following 
location(feature/bugfix/optimize/test) based on the type of PR -->
 
 ### feature:
+- [[#8014](https://github.com/apache/incubator-seata/pull/8014)] add P99.9 
latency percentile to benchmark CLI
+- [[#8015](https://github.com/apache/incubator-seata/pull/8015)] add XA mode 
support to benchmark CLI

Review Comment:
   This changelog entry includes PR #8015 (XA mode support), which is unrelated 
to this PR’s stated scope (P99.9 latency). Please remove unrelated PR entries 
so this PR only adds its own changelog line.



##########
changes/en-us/2.x.md:
##########
@@ -27,6 +29,7 @@ Add changes here for all PR submitted to the 2.x branch.
 - [[#8002](https://github.com/apache/incubator-seata/pull/8002)] add Grafana 
dashboard JSON for NamingServer metrics
 
 ### bugfix:
+- [[#8013](https://github.com/apache/incubator-seata/pull/8013)] fix duplicate 
columns in undo_log afterImage for composite primary key tables

Review Comment:
   This PR also adds a bugfix changelog entry for PR #8013, which is unrelated 
to the feature being introduced here. Please remove unrelated changelog lines 
from this PR.



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