[
https://issues.apache.org/jira/browse/AMBARI-18492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15536130#comment-15536130
]
Hudson commented on AMBARI-18492:
---------------------------------
FAILURE: Integrated in Jenkins build Ambari-branch-2.5 #98 (See
[https://builds.apache.org/job/Ambari-branch-2.5/98/])
AMBARI-18492 Clusters With Many Hosts Can Create Alerts With Text Too (dsen:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=df9854cf9a573651508cc20e09e30c602f981e5c])
* (edit) ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java
* (add)
ambari-server/src/test/java/org/apache/ambari/server/state/AlertTest.java
> Clusters With Many Hosts Can Create Alerts With Text Too Large To Be Stored
> ---------------------------------------------------------------------------
>
> Key: AMBARI-18492
> URL: https://issues.apache.org/jira/browse/AMBARI-18492
> Project: Ambari
> Issue Type: Bug
> Components: alerts
> Affects Versions: 2.2.2
> Reporter: Dmytro Sen
> Assignee: Dmytro Sen
> Priority: Critical
> Fix For: 2.4.2
>
> Attachments: AMBARI-18492_2.patch
>
>
> 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:
> {code}
> 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)
> {code}
> The quick solution to fix this problem is to increase the field to the
> {{MEDIUMTEXT}} size which allows for {{16MB}} of data (way overkill):
> {code}
> ALTER TABLE alert_history MODIFY alert_text MEDIUMTEXT;
> ALTER TABLE alert_current MODIFY latest_text MEDIUMTEXT;
> {code}
> Alert text should be middle-ellipsized
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)