-
Notifications
You must be signed in to change notification settings - Fork 15
[Named min timestamp leases] Metric tracking fresh ts shortfall #7402
base: develop
Are you sure you want to change the base?
Conversation
68962f6
to
69ff52c
Compare
b358204
to
81f7ee9
Compare
81f7ee9
to
80ae615
Compare
Generate changelog in
|
@@ -62,28 +64,38 @@ public final class TimestampLeaseAcquirerImpl implements TimestampLeaseAcquirer | |||
private final NamespacedTimestampLeaseService delegate; | |||
private final Unlocker unlocker; | |||
private final Supplier<UUID> uuidSupplier; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: should have asked on earlier review, but what is the purpose of the UUID supplier? We know from the type that it is a UUID supplier 😅
responseMap.get(timestampName).getFreshTimestamps().getCount(); | ||
return returnedTimestamps >= requestedTimestamps; | ||
}); | ||
long wereNotFullyFulfilled = requestedFreshTimestamps.keySet().stream() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: unfulfilledRequestCount
or similar?
unlock(response); | ||
log.info( | ||
"Timestamp lease request was not fully fulfilled. This should happen infrequently.", | ||
SafeArg.of("requests", requests), | ||
SafeArg.of("requests", request), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: makes sense, but change the arg name too.
return new TimestampLeaseAcquirerImpl( | ||
delegate, | ||
identifier -> unlock(unlocker, identifier), | ||
UniqueIds::pseudoRandomUuidV4, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally in the rest of the code we use UUID::randomUUID
. This is plausibly better, but was there a reason for using it here specifically?
timestampLease: | ||
docs: Timestamp lease client side telemetry | ||
metrics: | ||
notEnoughFreshTimestamps: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pedantry: I'd probably have instances
somewhere in the name, to be explicit that it's not the amount of shortfall that matters in this count
Non-contentious bits from #7400