-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/52383/#review150849
-----------------------------------------------------------




ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java (lines 37 
- 38)
<https://reviews.apache.org/r/52383/#comment218928>

    Is this right? It should be 65,536 - 2 bytes. Then I think it's safe to 
assume 2 bytes per character for UTF-8 databases which would make it 32617 
characters.



ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java (line 135)
<https://reviews.apache.org/r/52383/#comment218927>

    Use \u2026 instead of '...' to represent a single character which can't be 
broken across lines.


- Jonathan Hurley


On Sept. 29, 2016, 6:19 a.m., Dmytro Sen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/52383/
> -----------------------------------------------------------
> 
> (Updated Sept. 29, 2016, 6:19 a.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Vitalyi Brodetskyi.
> 
> 
> Bugs: AMBARI-18492
>     https://issues.apache.org/jira/browse/AMBARI-18492
> 
> 
> Repository: ambari
> 
> 
> 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)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Alert.java 
> 8252e0d 
>   ambari-server/src/test/java/org/apache/ambari/server/state/AlertTest.java 
> PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/52383/diff/
> 
> 
> Testing
> -------
> 
> Unit tests passed.
> 
> 
> Thanks,
> 
> Dmytro Sen
> 
>

Reply via email to