0

the method executeOnTimeup of ScheduleMessageService caculate the deliverTimestamp ,if the cqUnit.isTagsCodeValid() return true the tagsCode is tag hasCode,why can use this to caculate the time

CqUnit cqUnit = bufferCQ.next();
   long offsetPy = cqUnit.getPos();
   int sizePy = cqUnit.getSize();
   long tagsCode = cqUnit.getTagsCode();
   if (!cqUnit.isTagsCodeValid()) {
         long msgStoreTime = ScheduleMessageService.this.brokerController.getMessageStore().getCommitLog().pickupStoreTimestamp(offsetPy, sizePy);
       tagsCode = computeDeliverTimestamp(delayLevel, msgStoreTime);
    }
   long now = System.currentTimeMillis();
   long deliverTimestamp = this.correctDeliverTimestamp(now, tagsCode);

1 Answers1

0

This is definitely not what tagsCode is meant to be. As tagsCode in CQUnit represents the address for CQ extend files, which should not be utilized as a timestamp here. It should be another variable replacing the tagsCode usage for the deliverTimestamp here.

Jack Tsai
  • 26
  • 4