lei-xia commented on a change in pull request #1111:
URL: https://github.com/apache/helix/pull/1111#discussion_r446349305
##########
File path: helix-core/src/main/java/org/apache/helix/model/Message.java
##########
@@ -522,12 +538,25 @@ public long getExecuteStartTimeStamp() {
/**
* Get the time that this message was created
- * @return UNIX timestamp
+ * @return UNIX epoch timestamp
*/
public long getCreateTimeStamp() {
return _record.getLongField(Attributes.CREATE_TIMESTAMP.toString(), 0L);
}
+ /**
+ * Get the time that the message was expected to be completed
+ * @return UNIX epoch timestamp
+ */
+ public long getCompletionDueTimeStamp() {
+ long completionDue =
_record.getLongField(Attributes.COMPLETION_DUE_TIMESTAMP.name(), 0L);
+ if (completionDue == 0) {
+ completionDue = getCreateTimeStamp() + MESSAGE_EXPECT_COMPLETION_PERIOD;
+ }
Review comment:
I considered this, but think to avoid calling getCreateTimeStamp()
everytime since it involves string passing, may not be big deal though.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]