-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
return (long) (Math.min(BACKOFF_COEFF * Math.pow(2, numberOfAttempts), MAX_EXPECTED_BACKOFF) * randomCoeff); | ||
return (long) (Math.min(BACKOFF_COEFF * Math.pow(2, numberOfAttempts), (double) MAX_EXPECTED_BACKOFF) | ||
* randomCoeff); |
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.
From ./gradlew classes testClasses -PerrorProneApply=LongDoubleConversion
.numBytes(ESTIMATED_NUM_BYTES_PER_ROW * numberOfQueriedRows) | ||
.numBytes(ESTIMATED_NUM_BYTES_PER_ROW * ((long) numberOfQueriedRows)) |
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.
From ./gradlew classes testClasses -PerrorProneApply=NarrowCalculation
@@ -323,6 +323,7 @@ public Namespace getNamespace() { | |||
* | |||
* @param srcDir root source directory where code generation is performed. | |||
*/ | |||
@SuppressWarnings("DangerousIdentityKey") |
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.
DangerousIdentityKey
suppressions lifted directly from #5753
log.debug( | ||
"Encountered null metric context likely due to exception in preInvocation: {}", | ||
UnsafeArg.of("cause", cause), | ||
cause); | ||
log.debug("Encountered null metric context likely due to exception in preInvocation", cause); |
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.
DRY: Logging the cause as a throwable provides everything that cause.toString does, and more!
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.
👍
@@ -94,7 +94,7 @@ public void queriesGaugesAgainAfterTimeInterval() { | |||
|
|||
value.set(8); | |||
tick.addAndGet(DistributionOutlierController.REFRESH_INTERVAL.toNanos() + 1); | |||
assertThat(defaultController.getMeanGauge().getValue()).isEqualTo(8L); | |||
assertThat(defaultController.getMeanGauge().getValue()).isEqualTo((double) 8L); |
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.
assertThat(defaultController.getMeanGauge().getValue()).isEqualTo((double) 8L); | |
assertThat(defaultController.getMeanGauge().getValue()).isEqualTo(8.0); |
this is fine, and I don't expect us to fix this to get this merged, though this should really be 8.0
(possibly with whatever double equality hacks we need, though none are needed for 8).
More "the existing tests were naughty" rather than anything bad about this change
@@ -263,7 +263,7 @@ private void flushTask() { | |||
} | |||
} catch (Throwable t) { | |||
if (!Thread.interrupted()) { | |||
log.warn("Error occurred while flushing sweep stats: {}", UnsafeArg.of("throwable", t), t); |
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.
ugh. lol
==COMMIT_MSG==
Latest gradle-baseline
==COMMIT_MSG==