korlov42 commented on code in PR #2064:
URL: https://github.com/apache/ignite-3/pull/2064#discussion_r1194942287
##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ddl/DdlCommandHandlerWrapper.java:
##########
@@ -53,8 +57,15 @@ public DdlCommandHandlerWrapper(
@Override
public CompletableFuture<Boolean> handle(DdlCommand cmd) {
if (cmd instanceof CreateTableCommand) {
Review Comment:
since we always have to call super, does it make sense to move `if`
statement inside `thenCompose`?
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogServiceImpl.java:
##########
@@ -270,7 +323,7 @@ public void handle(VersionedUpdate update) {
registerCatalog(catalog);
- versionTracker.update(catalog.version(), null);
+
CompletableFuture.allOf(eventFutures.toArray(CompletableFuture[]::new)).thenRun(()
-> versionTracker.update(version, null));
Review Comment:
`thenRun` is invoked only in case of successful completion, but what if any
listener will throw an exception? We will get a frozen tests without notion
about what went wrong. Let's at least log the exception
##########
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/CatalogServiceSelfTest.java:
##########
@@ -247,6 +253,35 @@ public void catalogServiceManagesUpdateLogLifecycle()
throws Exception {
verify(updateLogMock).stop();
}
+ @Test
+ public void testCreateTableEvents() {
Review Comment:
let's test to validate CatalogEvent.TABLE_DROP
--
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]