KarlManong created FLINK-33933:
----------------------------------

             Summary: SerializedThrowable will be java.lang.StackOverflowError 
when AsyncLookupFunction throw an exception
                 Key: FLINK-33933
                 URL: https://issues.apache.org/jira/browse/FLINK-33933
             Project: Flink
          Issue Type: Bug
         Environment: tested from 1.16 to 1.18 , the same behavior 
            Reporter: KarlManong


Here is a simple example
{code:java}
// example

public class TableA implements LookupTableSource {


@Nullable
private final LookupCache cache;

public TableA(@Nullable LookupCache cache) {
this.cache = cache;
}

@Override
public LookupRuntimeProvider
getLookupRuntimeProvider(LookupContext context) {

FunctionA lookupFunction = new FunctionA();

if (cache != null) {
return PartialCachingAsyncLookupProvider.of(lookupFunction, cache);
} else {
return AsyncLookupFunctionProvider.of(lookupFunction);
}
}

@Override
public DynamicTableSource copy() {
return new TableA(cache);
}

@Override
public String asSummaryString() {
return "Async Table";
}
}

public class LookupFunctionA extends AsyncLookupFunction {


@Override
public CompletableFuture<Collection<RowData>> asyncLookup(RowData keyRow) {
CompletableFuture<Collection<RowData>> future = new
CompletableFuture<>();
future.completeExceptionally(new IOException("request failed"));
return future;
}

}
{code}
When using TableA, StackOverflowError occurs



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to