Github user jiny2 commented on a diff in the pull request:

    https://github.com/apache/incubator-hawq/pull/291#discussion_r50633726
  
    --- Diff: src/backend/resourcemanager/resourcepool.c ---
    @@ -893,6 +893,28 @@ int addHAWQSegWithSegStat(SegStat segstat, bool 
*capstatchanged)
        else {
                segresource = getSegResource(segid);
                Assert(segresource != NULL);
    +           uint8_t oldStatus = segresource->Stat->FTSAvailable;
    +           bool statusChanged = oldStatus != segstat->FTSAvailable;
    +
    +           /* Check if RM process is restarted in this segment */
    +           if (segresource->Stat->RMStartTimestamp != 
segstat->RMStartTimestamp)
    +           {
    +                   /*
    +                    * This segment's RM process has restarted,
    +                    * we should clean up old status, so mark it down.
    +                    */
    +                   if (oldStatus == RESOURCE_SEG_STATUS_AVAILABLE && 
!statusChanged)
    +                   {
    +                           segstat->FTSAvailable = 
RESOURCE_SEG_STATUS_UNAVAILABLE;
    +                           statusChanged = true;
    +                   }
    +                   segresource->Stat->RMStartTimestamp = 
segstat->RMStartTimestamp;
    +                   elog(LOG, "Master RM finds segment:%s 's RM process has 
restarted. "
    --- End diff --
    
    Suggest to report as a WARNING log.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to