denis-chudov commented on code in PR #7541:
URL: https://github.com/apache/ignite-3/pull/7541#discussion_r2774148841
##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/metrics/PlacementDriverMetricSource.java:
##########
@@ -90,9 +95,11 @@ public Iterable<Metric> metrics() {
private int numberOfLeases(boolean accepted) {
int count = 0;
+ HybridTimestamp now = clockService.current();
- for (Lease lease :
leaseTracker.leasesCurrent().leaseByGroupId().values()) {
- if (lease != null && accepted == lease.isAccepted()) {
+ for (Lease lease :
leaseTracker.leasesLatest().leaseByGroupId().values()) {
+ // Expired leases can be ignored.
+ if (lease != null && accepted == lease.isAccepted() &&
clockService.before(lease.getExpirationTime(), now)) {
Review Comment:
Who knows... it was here :)
I wouldn't expect that
--
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]