gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From huafengw <...@git.apache.org>
Subject [GitHub] incubator-gearpump pull request #67: fix GEARPUMP-32, introduce source water...
Date Mon, 22 Aug 2016 02:52:32 GMT
Github user huafengw commented on a diff in the pull request:

    https://github.com/apache/incubator-gearpump/pull/67#discussion_r75612603
  
    --- Diff: streaming/src/main/scala/org/apache/gearpump/streaming/task/TaskActor.scala
---
    @@ -322,11 +305,45 @@ class TaskActor(
       private def getSubscription(processorId: ProcessorId): Option[Subscription] = {
         subscriptions.find(_._1 == processorId).map(_._2)
       }
    +
    +  private def updateUpstreamMinClock(upstreamClock: TimeStamp): Unit = {
    +    if (upstreamClock > this.upstreamMinClock) {
    +      task.onWatermarkProgress(Instant.ofEpochMilli(this.upstreamMinClock))
    +    }
    +    this.upstreamMinClock = upstreamClock
    +
    +    val subMinClock = subscriptions.foldLeft(Long.MaxValue) { (min, sub) =>
    +      val subMin = sub._2.minClock
    +      // A subscription is holding back the _minClock;
    +      // we send AckRequest to its tasks to push _minClock forward
    +      if (subMin == _minClock) {
    +        sub._2.sendAckRequestOnStallingTime(_minClock)
    +      }
    +      Math.min(min, subMin)
    +    }
    +
    +    _minClock = Math.max(life.birth, Math.min(upstreamMinClock, subMinClock))
    +
    +    val update = UpdateClock(taskId, _minClock)
    +    context.system.scheduler.scheduleOnce(CLOCK_REPORT_INTERVAL) {
    +      LOG.info(s"send update $update")
    --- End diff --
    
    Change to debug?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message