Skip to content

[v25.3.x] [CORE-14786] rptest: speedup data_stat#30340

Merged
WillemKauf merged 1 commit intoredpanda-data:v25.3.xfrom
vbotbuildovich:backport-pr-30329-v25.3.x-745
Apr 29, 2026
Merged

[v25.3.x] [CORE-14786] rptest: speedup data_stat#30340
WillemKauf merged 1 commit intoredpanda-data:v25.3.xfrom
vbotbuildovich:backport-pr-30329-v25.3.x-745

Conversation

@vbotbuildovich
Copy link
Copy Markdown
Collaborator

Backport of PR #30329

Currently, we use:

```
f"find {RedpandaService.DATA_DIR} -type f -exec stat -c '%n %s' '{{}}' \\;"
```

as a way to stat all of the files in a `redpanda` directory on a node.
This is bad: with `-exec stat ... \;`, `find` runs one `stat` process per file.
We can do better simply by changing this command instead to:

```
f"find {RedpandaService.DATA_DIR} -type f -exec stat -c '%n %s' '{{}}' +"
```
Where `find` will batch as many files as possible to each `stat` call.
However, we can do even better by not using `-exec` at all:

```
f"find {RedpandaService.DATA_DIR} -ignore_readdir_race -type f -printf '%p %s\\n'"
```

Here, we don't need to fork any extra processes at all, and everything is
handled natively in `find`. Concurrent removal of files is silenced with
the flag `-ignore_readdir_race`.

This should fix timeouts in CI for tests with large numbers of files,
where 20+ minutes is spent waiting on these stat commands.

(cherry picked from commit 204defb)
@vbotbuildovich vbotbuildovich added this to the v25.3.x-next milestone Apr 29, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Apr 29, 2026
@vbotbuildovich
Copy link
Copy Markdown
Collaborator Author

Retry command for Build#83818

please wait until all jobs are finished before running the slash command

/ci-repeat 1
skip-redpanda-build
skip-units
skip-rebase
tests/rptest/tests/rpk_cluster_test.py::RpkClusterTest.test_upload_and_query_cluster_license_rpk

@vbotbuildovich
Copy link
Copy Markdown
Collaborator Author

CI test results

test results on build#83818
test_status test_class test_method test_arguments test_kind job_url passed reason test_history
FLAKY(FAIL) RpkClusterTest test_upload_and_query_cluster_license_rpk null integration https://buildkite.com/redpanda/redpanda/builds/83818#019dda29-5923-4e7d-be91-d7d0913d34bb 9/11 Test FAILS after retries.Significant increase in flaky rate(baseline=0.0000, p0=0.0000, reject_threshold=0.0100) https://redpanda.metabaseapp.com/dashboard/87-tests?tab=142-dt-individual-test-history&test_class=RpkClusterTest&test_method=test_upload_and_query_cluster_license_rpk

@WillemKauf WillemKauf enabled auto-merge April 29, 2026 18:16
@WillemKauf WillemKauf merged commit 505b845 into redpanda-data:v25.3.x Apr 29, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants