Uploaded image for project: 'Apache HAWQ (Retired)'
  1. Apache HAWQ (Retired)
  2. HAWQ-1315

Function validateResourcePoolStatus() in resourcepool.c is logging the wrong information

    XMLWordPrintableJSON

Details

    Description

      The function "validateResourcePoolStatus()" in "resourcepool.c" is not logging the correct information in the message printed by "elog()" function in line 4123. In the snippet below:

      if ( totalallocmem > mem || totalalloccore > core )
      {
               elog(WARNING, "HAWQ RM Validation. Allocated too much resource in resource "
                             "pool (%d MB, %lf CORE), maximum capacity (%d MB, %d CORE)",
                             totalallocmem,
                             totalalloccore,
                             core,
                             mem);
      }
      

      The third and fourth parameters ('core' and 'mem') are swapped; the third string placeholder should be the maximum memory capacity, but it is printing the cores. The same happens with the fourth string placeholder.

      This leads to log messages of this kind in hawq master log:

      2017-02-02 01:30:03.014708 CET,,,p351048,th-384374496,,,,0,con4,,seg-10000,,,,,"WARNING","01000","HAWQ RM Validation. Allocated too much resource in resource pool (49152 MB, 6.000000 CORE), maximum capacity (5 MB, 40960 CORE)",,,,,,,0,,"resourcepool.c",4123,
      

      Attachments

        Issue Links

          Activity

            People

              abai Amy Bai
              xsheng Xiang Sheng
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: