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

ASF GitHub Bot commented on ARTEMIS-1980:
-----------------------------------------

Github user clebertsuconic commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2181#discussion_r221341953
  
    --- Diff: 
artemis-jdbc-store/src/main/java/org/apache/activemq/artemis/jdbc/store/drivers/AbstractJDBCDriver.java
 ---
    @@ -227,7 +227,11 @@ private void createTableIfNotExists(String tableName, 
String... sqls) throws SQL
                       }
                    }
                 } catch (SQLException e) {
    -               logger.warn(JDBCUtils.appendSQLExceptionDetails(new 
StringBuilder("Can't verify the initialization of table 
").append(tableName).append(" due to:"), e, 
sqlProvider.getCountJournalRecordsSQL()));
    +               if (logger.isDebugEnabled()) {
    --- End diff --
    
    the if (logger.isDebugEnable()) is meant to avoid sending something to 
debug and have it ignored.
    
    
    you have two options:
    
    either:
    ```java
    if (logger.isDebugEnabled()) { 
      logger.debug(....);
    }
    ```
    
    
    or
    
    
    ```java
     logger.infof (...);
    ```
    
    
    keep it simple... mixing it like that may confuse debugging and the user In 
my experience.


> Warn on failed check of table existence should be info
> ------------------------------------------------------
>
>                 Key: ARTEMIS-1980
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1980
>             Project: ActiveMQ Artemis
>          Issue Type: Improvement
>          Components: Broker
>    Affects Versions: 2.6.2
>            Reporter: Francesco Nigro
>            Assignee: Francesco Nigro
>            Priority: Trivial
>             Fix For: 2.7.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> DB2 metadata checks should erroneously report stale table existence on
> not existing/just deleted table, making the subsequent warning logs of failed
> SELECT COUNT useless and scaring: should be better to let them lowered to 
> INFO level, avoiding users log reporting tools (if any) to react to an 
> expected behaviour.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to