You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/09/30 07:32:16 UTC

[GitHub] [inlong] gosonzhang opened a new pull request, #6077: [INLONG-6076][Audit] Bugs in the ClickHouseService.processOutput()

gosonzhang opened a new pull request, #6077:
URL: https://github.com/apache/inlong/pull/6077

   - Fixes #6076 
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] gosonzhang commented on a diff in pull request #6077: [INLONG-6076][Audit] Bugs in the ClickHouseService.processOutput()

Posted by GitBox <gi...@apache.org>.
gosonzhang commented on code in PR #6077:
URL: https://github.com/apache/inlong/pull/6077#discussion_r984345394


##########
inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/service/ClickHouseService.java:
##########
@@ -99,10 +99,13 @@ private void processOutput() {
             return;
         }
         // output
-        try (PreparedStatement pstat = this.conn.prepareStatement(INSERT_SQL)) {

Review Comment:
   Ok, you are right



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] healchow commented on a diff in pull request #6077: [INLONG-6076][Audit] Bugs in the ClickHouseService.processOutput()

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #6077:
URL: https://github.com/apache/inlong/pull/6077#discussion_r984340515


##########
inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/service/ClickHouseService.java:
##########
@@ -99,10 +99,13 @@ private void processOutput() {
             return;
         }
         // output
-        try (PreparedStatement pstat = this.conn.prepareStatement(INSERT_SQL)) {

Review Comment:
   Suggested using the `try-with-resource`, because the `PreparedStatement` implements the `AutoCloseable` interface, it will be closed automatically, we don't need to write additional `finally` block to close it.



##########
inlong-audit/audit-store/src/main/java/org/apache/inlong/audit/service/ClickHouseService.java:
##########
@@ -99,10 +99,13 @@ private void processOutput() {
             return;
         }
         // output
-        try (PreparedStatement pstat = this.conn.prepareStatement(INSERT_SQL)) {

Review Comment:
   Suggested using the `try-with-resource`, because the `PreparedStatement` implements the `AutoCloseable` interface, it will be closed automatically, we don't need to write an additional `finally` block to close it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [inlong] dockerzhang merged pull request #6077: [INLONG-6076][Audit] Bugs in the ClickHouseService.processOutput()

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #6077:
URL: https://github.com/apache/inlong/pull/6077


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org