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


##########
integration-tx-api/src/main/java/org/apache/seata/integration/tx/api/util/JsonUtil.java:
##########
@@ -25,7 +25,7 @@
 import java.util.Objects;
 
 /**
- * @deprecated use {@link org.apache.seata.common.json.JsonUtil} in 
json-common-core module instead.
+ * @deprecated use {@link org.apache.seata.common.json.JsonUtil} in 
seata-common module instead.
  */

Review Comment:
   The deprecation Javadoc points to `org.apache.seata.common.json.JsonUtil` 
but says it lives in the `seata-common` module; in this refactor `JsonUtil` is 
located under the `seata-core` artifact (it depends on `ConfigurationFactory`). 
This can mislead users trying to add the right dependency.



##########
discovery/seata-discovery-core/src/main/java/org/apache/seata/discovery/registry/RegistryHeartBeats.java:
##########
@@ -42,8 +43,8 @@ public class RegistryHeartBeats {
     private static final long DEFAULT_HEARTBEAT_PERIOD = 60 * 1000;
     private static final boolean DEFAULT_HEARTBEAT_ENABLED = Boolean.TRUE;
 
-    private static final ScheduledExecutorService HEARTBEAT_SCHEDULED =
-            
ThreadPoolExecutorFactory.newScheduledThreadPoolExecutor("seata-discovery-heartbeat",
 1, true);
+    private static final ScheduledExecutorService HEARTBEAT_SCHEDULED = new 
PlatformThreadPoolProvider()
+            .newScheduledThreadPoolExecutor("seata-discovery-heartbeat", 1, 
true, new ThreadPoolExecutor.AbortPolicy());
 

Review Comment:
   `RegistryHeartBeats` now hard-wires `PlatformThreadPoolProvider`, which 
bypasses `transport.threadpool` selection (virtual/auto) and will always use 
platform threads even when the JDK21 provider is on the classpath. If that 
behavior change is unintended, consider resolving `ThreadPoolProvider` via SPI 
+ config (without depending on `seata-core`) so virtual threads can be used 
when configured.



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