wuchong commented on code in PR #2852:
URL: https://github.com/apache/fluss/pull/2852#discussion_r2939768127
##########
fluss-server/src/main/java/org/apache/fluss/server/zk/ZooKeeperClient.java:
##########
@@ -495,31 +495,62 @@ public List<String> listDatabases() throws Exception {
public List<DatabaseSummary> listDatabaseSummaries(Collection<String>
databaseNames)
throws Exception {
- Map<String, String> path2DatabaseNamesMap =
+ Map<String, String> dbPathToDatabaseName =
databaseNames.stream()
.collect(toMap(DatabaseZNode::path, databaseName ->
databaseName));
- List<ZkCheckExistsResponse> statsInBackground =
- getStatInBackground(path2DatabaseNamesMap.keySet());
+ Map<String, String> tablesPathToDatabaseName =
+ databaseNames.stream()
+ .collect(toMap(TablesZNode::path, databaseName ->
databaseName));
+ List<ZkCheckExistsResponse> dbStatResponses =
+ getStatInBackground(dbPathToDatabaseName.keySet());
+ List<ZkCheckExistsResponse> tablesStatResponses =
+ getStatInBackground(tablesPathToDatabaseName.keySet());
Review Comment:
This change introduces double I/O overhead to the request. I suggest
batching the stats retrieval operations to enable full parallelization, which
will significantly reduce the total execution time.
##########
website/docs/_configs/_partial_config.mdx:
##########
@@ -78,7 +78,7 @@
| `client.lookup.batch-timeout` | `0 s` | Duration | The maximum time to wait
for the lookup batch to full, if this timeout is reached, the lookup batch will
be closed to send. |
| `client.lookup.max-retries` | `2147483647` | Integer | Setting a value
greater than zero will cause the client to resend any lookup request that fails
with a potentially transient error. |
| `client.scanner.remote-log.prefetch-num` | `4` | Integer | The number of
remote log segments to keep in local temp file for LogScanner, which download
from remote storage. The default setting is 4. |
-| `client.scanner.io.tmpdir` |
`/var/folders/bp/v2l48kz51mx86d743qv0zhzh0000gn/T//fluss` | String | Local
directory that is used by client for storing the data files (like kv snapshot,
log segment files) to read temporarily |
+| `client.scanner.io.tmpdir` |
`/var/folders/qw/wkqk76752w15lm9xdq4q22s00000gp/T//fluss` | String | Local
directory that is used by client for storing the data files (like kv snapshot,
log segment files) to read temporarily |
Review Comment:
revert changes to this file
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]