You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kudu.apache.org by "Alexey Serbin (Jira)" <ji...@apache.org> on 2026/02/27 22:49:00 UTC

[jira] [Created] (KUDU-3747) Clarify on the C++ client meta-cache logic for create-table-and-immediate-write-and-scan use case

Alexey Serbin created KUDU-3747:
-----------------------------------

             Summary: Clarify on the C++ client meta-cache logic for create-table-and-immediate-write-and-scan use case
                 Key: KUDU-3747
                 URL: https://issues.apache.org/jira/browse/KUDU-3747
             Project: Kudu
          Issue Type: Task
          Components: client
    Affects Versions: 1.18.1, 1.17.1, 1.18.0, 1.17.0, 1.16.0, 1.15.0, 1.14.0, 1.13.0
            Reporter: Alexey Serbin


With KUDU-1802 implemented, the Kudu C++ client is able to obtain information on tablet replica locations from scan tokens, avoiding extra calls to Kudu masters when such information in present.  It works very well in the majority of use cases.  However, a couple of surprises were discovered in a relatively rare use case when a Kudu client application creates a new table, immediately start writing data into the newly created table, and then reads data back from the table.

The two unexpected items are:
# After populating its metacache with the information on the location of tablet replicas and using it while writing data into the newly created table, the client still calls {{KuduClient::Data::GetTabletServer()}} as a part of {{KuduScanner::Data::OpenTablet()}}.
# Even if ignoring the already existing tablet location information in the metacache (say, if it's short-lived and already expired), it would be natural for the client at least to rely on the information in the scan tokens when opening a table for scanning, given KUDU-1802 provisions are already there.

This became apparent once increasing the setting for the {{\-\-raft_heartbeat_interval_ms}} setting that Kudu tablet servers run tenfold (i.e. from default 500 ms to 5000 ms): the client application that tries to exercise the described use case exhibited high latency when calling {{KuduScanner::Open()}} right after writing a few rows into the newly created table.

It's necessary to clarify what's going on.

Attached is a sample Kudu client application in C++.  Compile it similarly to {{$KUDU_HOME/examples/cpp/example.cc}} and run against a Kudu cluster having at least three tablet servers.



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