eagle-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EAGLE-851) Add validation for policy name
Date Mon, 09 Jan 2017 02:48:58 GMT

    [ https://issues.apache.org/jira/browse/EAGLE-851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15810482#comment-15810482
] 

ASF GitHub Bot commented on EAGLE-851:
--------------------------------------

GitHub user r7raul1984 opened a pull request:

    https://github.com/apache/eagle/pull/765

    [EAGLE-851]  Add validation for policy name

    - Add checkPolicyName method to check the length of policy name.
    
    https://issues.apache.org/jira/browse/EAGLE-851


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/1haodian/eagle EAGLE-851

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/eagle/pull/765.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #765
    
----
commit 965bb33747e14171833f9970aa1fecc603e37dd3
Author: r7raul1984 <tangjijun@yhd.com>
Date:   2017-01-09T02:38:21Z

    [EAGLE-851]  Add validation for policy name
    
    - Add checkPolicyName method to check the length of policy name.
    
    https://issues.apache.org/jira/browse/EAGLE-851

----


> Add validation for policy name
> ------------------------------
>
>                 Key: EAGLE-851
>                 URL: https://issues.apache.org/jira/browse/EAGLE-851
>             Project: Eagle
>          Issue Type: Bug
>          Components: Web UI
>            Reporter: JiJun Tang
>            Assignee: JiJun Tang
>            Priority: Minor
>             Fix For: v0.5.0
>
>
> Long policyId will cause exception like below:
> {noformat}
> ERROR [2017-01-09 01:07:35,547] org.apache.eagle.alert.metadata.impl.JdbcMetadataHandler:
Error to add publishments to policy xxx_topologyHealthCheckApp_nodeManagerStatusNotRunning
> ! com.mysql.jdbc.MysqlDataTruncation: Data truncation: Data too long for column 'policyId'
at row 1
> ! at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3885) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3823) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2435) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2582) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2530) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1907) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2141) ~[mysql-connector-java-5.1.34.jar:5.1.34]
> ! at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1773)
~[mysql-connector-java-5.1.34.jar:5.1.34]
> {noformat}
> We should check the length of policyId before insert into the table.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message