Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AMORO-2638] fix refresh-external-catalogs cannot be completed when exist database listTable fails #2639

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Optional;
Expand Down Expand Up @@ -461,10 +462,17 @@
try {
tableIdentifiersFutures.add(
CompletableFuture.supplyAsync(
() ->
externalCatalog.listTables(database).stream()
() -> {
try {
return externalCatalog.listTables(database).stream()
.map(TableIdentity::new)
.collect(Collectors.toSet()),
.collect(Collectors.toSet());
} catch (Exception e) {
LOG.error(

Check warning on line 471 in ams/server/src/main/java/com/netease/arctic/server/table/DefaultTableService.java

View check run for this annotation

Codecov / codecov/patch

ams/server/src/main/java/com/netease/arctic/server/table/DefaultTableService.java#L470-L471

Added lines #L470 - L471 were not covered by tests
"TableExplorer list tables in database {} error", database, e);
return new HashSet<>();

Check warning on line 473 in ams/server/src/main/java/com/netease/arctic/server/table/DefaultTableService.java

View check run for this annotation

Codecov / codecov/patch

ams/server/src/main/java/com/netease/arctic/server/table/DefaultTableService.java#L473

Added line #L473 was not covered by tests
}
},
tableExplorerExecutors));
} catch (RejectedExecutionException e) {
LOG.error(
Expand Down
Loading