exceptionfactory commented on code in PR #6374:
URL: https://github.com/apache/nifi/pull/6374#discussion_r966370275
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/status/history/EmbeddedQuestDbRolloverHandler.java:
##########
@@ -91,7 +95,8 @@ private void rolloverTable(final CharSequence tableName) {
private void deletePartition(final CharSequence tableName, final String
partition) {
try (final SqlCompiler compiler = dbContext.getCompiler()) {
- compiler.compile(String.format(DELETION_QUERY, new
Object[]{tableName, partition}), dbContext.getSqlExecutionContext());
+ final CompiledQuery compile =
compiler.compile(String.format(DELETION_QUERY, new Object[]{tableName,
partition}), dbContext.getSqlExecutionContext());
Review Comment:
It looks like the wrapping `Object[]` could be removed from String.format():
```suggestion
final CompiledQuery compile =
compiler.compile(String.format(DELETION_QUERY, tableName, partition),
dbContext.getSqlExecutionContext());
```
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/status/history/EmbeddedQuestDbRolloverHandler.java:
##########
@@ -91,7 +95,8 @@ private void rolloverTable(final CharSequence tableName) {
private void deletePartition(final CharSequence tableName, final String
partition) {
try (final SqlCompiler compiler = dbContext.getCompiler()) {
- compiler.compile(String.format(DELETION_QUERY, new
Object[]{tableName, partition}), dbContext.getSqlExecutionContext());
+ final CompiledQuery compile =
compiler.compile(String.format(DELETION_QUERY, new Object[]{tableName,
partition}), dbContext.getSqlExecutionContext());
+ compile.execute(new SCSequence(new TimeoutBlockingWaitStrategy(5,
TimeUnit.SECONDS)));
Review Comment:
Prior to this change, was the delete query not being executed?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]