je-ik commented on a change in pull request #16650:
URL: https://github.com/apache/beam/pull/16650#discussion_r797402567
##########
File path:
runners/core-java/src/main/java/org/apache/beam/runners/core/TimerInternals.java
##########
@@ -262,11 +262,19 @@ public int compareTo(TimerData that) {
.compare(this.getDomain(), that.getDomain())
.compare(this.getTimerId(), that.getTimerId())
.compare(this.getTimerFamilyId(), that.getTimerFamilyId());
- if (chain.result() == 0 &&
!this.getNamespace().equals(that.getNamespace())) {
+ int compResult = chain.result();
+ if (compResult == 0 && !this.getNamespace().equals(that.getNamespace()))
{
// Obtaining the stringKey may be expensive; only do so if required
- chain = chain.compare(getNamespace().stringKey(),
that.getNamespace().stringKey());
+ compResult =
this.getNamespace().stringKey().compareTo(that.getNamespace().stringKey());
}
- return chain.result();
+ return compResult;
+ }
+
+ public String stringKey() {
+ return getNamespace().stringKey()
+ + getDomain().toString()
+ + getTimerFamilyId()
Review comment:
Are we missing any separators between various parts? If it gets logged,
it would improve readability.
--
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]