Skip to content

Commit

Permalink
Suppress LeaseAssignmentManager excessive WARN logs when there is no …
Browse files Browse the repository at this point in the history
…issue (#1437)

This commit fixes #1407. The WARN level log statements should only be executed when a real problem had been detected.
  • Loading branch information
ivanlkc authored Feb 7, 2025
1 parent ae9a433 commit 68a7a9b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ public void loadInMemoryStorageView(final MetricsScope metricsScope) throws Exce
.filter(workerMetrics -> !workerMetrics.isValidWorkerMetric())
.map(WorkerMetricStats::getWorkerId)
.collect(Collectors.toList());
log.warn("List of workerIds with invalid entries : {}", listOfWorkerIdOfInvalidWorkerMetricsEntry);
if (!listOfWorkerIdOfInvalidWorkerMetricsEntry.isEmpty()) {
log.warn("List of workerIds with invalid entries : {}", listOfWorkerIdOfInvalidWorkerMetricsEntry);
metricsScope.addData(
"NumWorkersWithInvalidEntry",
listOfWorkerIdOfInvalidWorkerMetricsEntry.size(),
Expand Down Expand Up @@ -567,8 +567,8 @@ public void loadInMemoryStorageView(final MetricsScope metricsScope) throws Exce

final Map.Entry<List<Lease>, List<String>> leaseListResponse = leaseListFuture.join();
this.leaseList = leaseListResponse.getKey();
log.warn("Leases that failed deserialization : {}", leaseListResponse.getValue());
if (!leaseListResponse.getValue().isEmpty()) {
log.warn("Leases that failed deserialization : {}", leaseListResponse.getValue());
MetricsUtil.addCount(
metricsScope,
"LeaseDeserializationFailureCount",
Expand Down

0 comments on commit 68a7a9b

Please sign in to comment.