Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-18492

Clusters With Many Hosts Can Create Alerts With Text Too Large To Be Stored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.2.2
    • 2.4.2
    • alerts
    • None

    Description

      When running alerts in a large cluster (for example a cluster with 1300 hosts), some alerts like the Stale Alert may create text too large to store in the database.

      On MySQL, for example, the size of a TEXT field is 65k (less if UTF-8 is used). Normally, this is plenty of space. However, some clusters experience:

      ERROR [alert-event-bus-1] AmbariJpaLocalTxnInterceptor:188 - [DETAILED ERROR] Internal exception (1) :
      com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'alert_text' at row 1
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4185)
      

      The quick solution to fix this problem is to increase the field to the MEDIUMTEXT size which allows for 16MB of data (way overkill):

      ALTER TABLE alert_history MODIFY alert_text MEDIUMTEXT;
      ALTER TABLE alert_current MODIFY latest_text MEDIUMTEXT;
      

      Alert text should be middle-ellipsized

      Attachments

        1. AMBARI-18492_2.patch
          3 kB
          Dmytro Sen

        Issue Links

          Activity

            People

              dsen Dmytro Sen
              dsen Dmytro Sen
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: