mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-12-04 18:17:16 +01:00
c00b846bf5dcde8629e9d8d8eef48979af7bb028
2
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f599f870a8 |
s3: list without a delimiter from one range of the filer store (#13263)
* s3: -s3.listRecursiveFromStore, on by default Lets an operator keep recursive listings on the directory walk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3: list without a delimiter from one range of the filer store A bucket that never had versioning is listed with ListEntriesRecursive: one read of the bucket's path range per page instead of one directory listing per directory. A folder object's "<dir>/" key waits for its place in key order, and the folder objects whose rows sort before the range (the one the prefix names, those the marker ends inside of) are looked up. .uploads is skipped; a .versions folder hands the page to the walk, as does a filer that answers Unimplemented, which is then not asked again for a minute. The test pages through both ways over the same tree, for prefixes, markers and page sizes, and expects the same keys, sizes, ETags and markers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * test/postgres_flat: a range-read gateway lists what the walking one does A second S3 gateway with -listRecursiveFromStore=false runs on the same filer. ListObjectsV2 and V1 pages agree for prefixes, markers and page sizes over folder objects, a prefix object, an unfinished upload and +/-/0 neighbours. Listing 60 keys five directories deep scans the bucket table 2 times from the range read and 302 times from the walk. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * s3: range-read listings without the -s3.listRecursiveFromStore flag A filer whose store cannot list a range answers Unimplemented and the gateway already walks that bucket's directories instead, so the flag only switched off a path that falls back by itself. The unit test forces the walk through the decline cache, and the postgres_flat test checks pages against the keys in byte order rather than against a second gateway. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: step a range-read listing over the bucket's upload parts The walk skips the bucket's .uploads folder as one entry, but a range read from the bucket root streamed every part of every unfinished upload and dropped them, one 1024-row window after another, on each first page. Every path under .uploads/ sorts before ".uploads0", so the read resumes there and looks up the one key with that name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: list a waiting folder object once a row passes its key A range-read page queued every childless folder object until a file row arrived, so max-keys=1 over a bucket of empty folders read the whole bucket before answering. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * s3: forget a deleted bucket's recursive-listing decline Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
b7536bd6f6 |
test: S3, versioning and FUSE integration tests for the postgres_flat filer store (#13255)
* test/postgres_flat: S3 against a filer on the postgres_flat store A weed mini whose filer.toml enables postgres_flat in a schema of its own. Objects, listings, copies, multipart uploads, versions and bucket deletion are checked through S3 and against the rows of the bucket's table. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * test/postgres_flat: a FUSE mount against the postgres_flat store Files, a directory longer than a listing page, renames, hard and symbolic links, tree removal and a bucket made through the mount, checked against the rows, then read back by a second mount with an empty metadata cache. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * ci: run the postgres_flat S3 and FUSE tests against Postgres Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * ci: run the postgres_flat tests on pull requests to any branch Like the S3 workflows, so a stacked pull request runs them too, and only when the code they reach changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * test/postgres_flat: fail fast when weed mini or the mount exits ProcessState is only set by Wait, which ran only at cleanup, so a mini or mount that died at startup was noticed only at the 45s or 90s deadline. Reap each command as it starts and check for its exit while waiting. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * ci: run the postgres_flat tests on changes anywhere under weed/ The tests run master, volume, filer, S3 and a mount, so changes in packages such as weed/pb, weed/wdclient or weed/credential reach them too. Match the FUSE integration workflow and also trigger on the fusermount action the job uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test/postgres_flat: versioned buckets on the postgres_flat store Versions and delete markers are rows under the key's .versions folder in the bucket's table. Covers version listings in one page and one version a page, delete markers, promoting the previous version, the null version under suspended versioning, and dropping the table once every version and the bucket are deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * ci: run the S3 versioning suite on a postgres_flat filer The whole test/s3/versioning suite, stress tests included, against a weed mini whose filer.toml enables postgres_flat. The job first checks that filemeta has the flat layout, so a filer on its default store cannot pass. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * test/postgres_flat: set up shared objects before the subtests The S3 and versioning suites wrote their objects and the second bucket inside the first subtest, so running one later subtest with -run left the version ids empty and panicked. The parent test now writes them and the subtests only check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test/postgres_flat: helpers fail the test that calls them paths, tableExists, count, filerList, start and mount take the caller's *testing.T, so a failure inside a subtest fails that subtest instead of calling FailNow on the parent and stopping its siblings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011UpvafvK8JpagF94MHWqwK * ci: wait for the filemeta table before the versioning suite Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test/postgres_flat: POSIX subtests set up their own fixtures Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test/postgres_flat: absent versions must answer 404 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |