Bug Description
What happened:
StorageBasedLockProvider.renewLock()
long oldExpirationMs = getLock().getValidUntilMs();
// ... renewal succeeds, lock updated to new expiration (lockExpirationMs) ...
hoodieLockMetrics.ifPresent(metrics -> metrics.updateLockExpirationDeadlineMetric(
(int) (oldExpirationMs - getCurrentEpochMs())));
// Value: ~30000 ms (remaining time on the PREVIOUS lease, not the new one)
After every heartbeat renewal the metric drops from ~300s to ~30s, then jumps back to ~300s on the next tryLock. This produces a misleading sawtooth pattern on dashboards.
Note: the log message on the next line intentionally uses oldExpirationMs to report the heartbeat margin — that's correct and useful. Only the metric is wrong.
What you expected:
Metrics to report the correct expiration time.
Steps to reproduce:
1.
2.
3.
Environment
Hudi version:
Query engine: (Spark/Flink/Trino etc)
Relevant configs:
Logs and Stack Trace
No response
Bug Description
What happened:
StorageBasedLockProvider.renewLock()
After every heartbeat renewal the metric drops from ~300s to ~30s, then jumps back to ~300s on the next tryLock. This produces a misleading sawtooth pattern on dashboards.
Note: the log message on the next line intentionally uses oldExpirationMs to report the heartbeat margin — that's correct and useful. Only the metric is wrong.
What you expected:
Metrics to report the correct expiration time.
Steps to reproduce:
1.
2.
3.
Environment
Hudi version:
Query engine: (Spark/Flink/Trino etc)
Relevant configs:
Logs and Stack Trace
No response