Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-3934

Start scripts enable GC by default with no way to disable

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.8.2.0
    • Fix Version/s: 0.10.1.0
    • Component/s: None
    • Labels:
      None

      Description

      In KAFKA-1127 the following line was added to kafka-server-start.sh:

      EXTRA_ARGS="-name kafkaServer -loggc"
      

      This prevents gc logging from being disabled without some unusual environment variable workarounds.

      I suggest EXTRA_ARGS is made overridable like below:

      if [ "x$EXTRA_ARGS" = "x" ]; then
          export EXTRA_ARGS="-name kafkaServer -loggc"
      fi
      

      Note: I am also not sure I understand why the existing code uses the "x" thing when checking the variable instead of the following:

      export EXTRA_ARGS=${EXTRA_ARGS-'-name kafkaServer -loggc'}
      

      This lets the variable be overridden to "" without taking the default.

      Workaround: As a workaround the user should be able to set $KAFKA_GC_LOG_OPTS to fit their needs. Since kafka-run-class.sh will not ignore the -loggc parameter if that is set.

      -loggc)
            if [ -z "$KAFKA_GC_LOG_OPTS" ]; then
              GC_LOG_ENABLED="true"
            fi
            shift
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                granthenke Grant Henke
                Reporter:
                granthenke Grant Henke
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: