Copilot commented on code in PR #5664:
URL: https://github.com/apache/ignite-3/pull/5664#discussion_r2053855692


##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1586,6 +1586,8 @@ public void loadTableListenerToZoneReplica(
     ) {
         ZonePartitionResources resources = 
zoneResourcesManager.getZonePartitionResources(zonePartitionId);
 
+        assert resources != null : "Zone partition resources not found 
[zonePartitionId=" + zonePartitionId + ']';

Review Comment:
   Using an assert as the sole check may not enforce the non-null invariant in 
production (when assertions are disabled). Consider adding an explicit runtime 
null check and appropriate error handling.
   ```suggestion
           Objects.requireNonNull(resources, "Zone partition resources not 
found [zonePartitionId=" + zonePartitionId + ']');
   ```



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

Reply via email to