prestodb / presto

The official home of the Presto distributed SQL query engine for big data
http://prestodb.io
Apache License 2.0
15.79k stars 5.3k forks source link

Too many TGS_REQ From JDBC (for kerberos) #18818

Open lurnagao-dahua opened 1 year ago

lurnagao-dahua commented 1 year ago

Hi !

I found about five TGS_REQ from jdbc per second in one query .

Thank you very much for the answer!

prestored commented 1 year ago

Could you please clarify your question here? Are you facing an issue here?

lurnagao-dahua commented 1 year ago

Could you please clarify your question here? Are you facing an issue here?

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 your answer!