Skip to content

[server] Fix get table count of database.#2852

Open
loserwang1024 wants to merge 1 commit intoapache:mainfrom
loserwang1024:fix-database-summbary
Open

[server] Fix get table count of database.#2852
loserwang1024 wants to merge 1 commit intoapache:mainfrom
loserwang1024:fix-database-summbary

Conversation

@loserwang1024
Copy link
Contributor

@loserwang1024 loserwang1024 commented Mar 12, 2026

Purpose

Linked issue: close #2851

Brief change log

Tests

API and Format

Documentation

@loserwang1024 loserwang1024 force-pushed the fix-database-summbary branch 2 times, most recently from 75bd789 to 7ae61fc Compare March 12, 2026 02:55
@loserwang1024 loserwang1024 force-pushed the fix-database-summbary branch from 7ae61fc to 4073899 Compare March 12, 2026 11:40
@loserwang1024 loserwang1024 requested a review from wuchong March 12, 2026 12:56
@wuchong
Copy link
Member

wuchong commented Mar 16, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

| `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 |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes to this file

Comment on lines +501 to +507
Map<String, String> tablesPathToDatabaseName =
databaseNames.stream()
.collect(toMap(TablesZNode::path, databaseName -> databaseName));
List<ZkCheckExistsResponse> dbStatResponses =
getStatInBackground(dbPathToDatabaseName.keySet());
List<ZkCheckExistsResponse> tablesStatResponses =
getStatInBackground(tablesPathToDatabaseName.keySet());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ListDatabaseSummary always return table count as 0 or 1

2 participants