openlookeng / hetu-core

570 stars 423 forks source link

too many tgs_req from jdbc (for kerberos) #414

Closed lurnagao-dahua closed 3 months ago

lurnagao-dahua commented 1 year ago

Hi ! I have a question in trino/prestodb, so i was wondering if openlookeng has this problem?

In function StatementClientV1#advance, each call to the JsonResponse.execute(QUERY_RESULTS_CODEC, httpClient, request) will sends a tgs_req to kdc :

while (true) {
    if (isClientAborted()) {
        return false;
    }
    ...
    JsonResponse<QueryResults> response;
    try {
        response = JsonResponse.execute(QUERY_RESULTS_CODEC, httpClient, request);
    }
    catch (RuntimeException e) {
        cause = e;
        continue;
    }
    ...
}

The function statementClientV1#advance is getting results from coordinator.

Sounds like there is no service ticket cache so the client does the auth everytime.

Thank you very much for the answer!