denis-chudov commented on code in PR #1006:
URL: https://github.com/apache/ignite-3/pull/1006#discussion_r947678576
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -1294,37 +1295,17 @@ public CompletableFuture<TableImpl>
tableAsyncInternal(UUID id, boolean checkCon
CompletableFuture<TableImpl> getTblFut = new CompletableFuture<>();
- EventListener<TableEventParameters> clo = new EventListener<>() {
- @Override
- public CompletableFuture<Boolean> notify(@NotNull
TableEventParameters parameters, @Nullable Throwable e) {
- if (!id.equals(parameters.tableId())) {
- return completedFuture(false);
- }
-
- if (e == null) {
- tablesByIdVv.get(parameters.causalityToken()).thenRun(()
-> getTblFut.complete(parameters.table()));
- } else {
- getTblFut.completeExceptionally(e);
- }
-
- return completedFuture(true);
- }
-
- @Override
- public void remove(@NotNull Throwable e) {
- getTblFut.completeExceptionally(e);
+ IgniteTriConsumer<Long, Map<UUID, TableImpl>, Throwable>
tablesListener = (token, tables, th) -> {
+ if (th == null) {
+ tablesByIdVv.get(token).thenRun(() ->
getTblFut.complete(tablesByIdVv.latest().get(id)));
Review Comment:
```suggestion
getTblFut.complete(tables.get(id));
```
--
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]