Copilot commented on code in PR #7434:
URL: https://github.com/apache/incubator-seata/pull/7434#discussion_r2143080410
##########
server/src/main/java/org/apache/seata/server/ServerRunner.java:
##########
@@ -90,6 +92,8 @@ public void destroy() throws Exception {
disposable.destroy();
}
+ System.clearProperty(SERVER_SERVICE_PORT_CAMEL);
Review Comment:
[nitpick] Multiple components clear the SERVER_SERVICE_PORT_CAMEL property;
consider centralizing this cleanup in a common utility or the
BaseSpringBootTest to reduce duplication and potential inconsistencies.
##########
namingserver/src/main/java/org/apache/seata/namingserver/manager/NamingManager.java:
##########
@@ -246,6 +246,9 @@ public boolean registerInstances(List<NamingServerNode>
node, String namespace,
}
public boolean registerInstance(NamingServerNode node, String namespace,
String clusterName, String unitName) {
Review Comment:
[nitpick] Consider adding a comment to explain why returning false when the
node is null is the desired behavior, which would help future maintainers
understand the design decision.
```suggestion
public boolean registerInstance(NamingServerNode node, String namespace,
String clusterName, String unitName) {
// If the node is null, it indicates an invalid input or a missing
node.
// Returning false here signifies that the registration process has
failed,
// allowing the caller to handle this scenario appropriately.
```
--
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]