sk0x50 commented on code in PR #5683:
URL: https://github.com/apache/ignite-3/pull/5683#discussion_r2057716991
##########
modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java:
##########
@@ -1720,12 +1717,17 @@ private CompletableFuture<Void>
stopPartitionForRestartInternal(ZonePartitionId
@TestOnly
public HybridTimestamp currentSafeTimeForZonePartition(int zoneId, int
partId) {
- return
requireNonNull(zoneResourcesManager.getZonePartitionResources(new
ZonePartitionId(zoneId, partId))).raftListener()
- .currentSafeTime();
+ return zonePartitionResources(new ZonePartitionId(zoneId,
partId)).raftListener().currentSafeTime();
}
- @TestOnly
+ /**
+ * Returns resources for the given zone partition.
+ */
public ZonePartitionResources zonePartitionResources(ZonePartitionId
zonePartitionId) {
- return
requireNonNull(zoneResourcesManager.getZonePartitionResources(zonePartitionId));
+ ZonePartitionResources resources =
zoneResourcesManager.getZonePartitionResources(zonePartitionId);
+
+ assert resources != null : "Missing resources for zone partition: " +
zonePartitionId;
Review Comment:
I prefer JSON-like formatting: `Missing resources for zone partition
[zonePartitionId=0_part_12]`.
Just like we use in logging
https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=217393104#JavaLoggingGuidelines-MessageFormat
--
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]