Skip to content

Optimize storage backends and improve task cleanup performance - #553

Open
jcbl1 wants to merge 2 commits into
vastsa:masterfrom
jcbl1:upstream/06-cleanup-batching
Open

jcbl1 wants to merge 2 commits into
vastsa:masterfrom
jcbl1:upstream/06-cleanup-batching

Conversation

@jcbl1

@jcbl1 jcbl1 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

No description provided.

jcbl1 added 2 commits October 24, 2026 08:17
- import storage backends on first use so local mode never loads aioboto3/botocore/aiohttp
- reuse S3/WebDAV/OpenDAL instances while their config signature is unchanged
- merge local chunks in 256KB blocks and hash incrementally
- stream OpenDAL save/merge via open("wb") with a legacy fallback
- move blocking local fs cleanup and share-dir walks into asyncio.to_thread
- cover lazy imports, cache invalidation, streaming bounds and thread offload
delete_expire_files, clean_incomplete_uploads and
clean_expired_presign_sessions now walk rows with an id cursor in batches of
200, loading only the columns they need (text payloads are never selected).
The cursor also keeps a failing delete from retrying the same batch forever.

Covered by tests/test_cleanup_batching.py: >1 batch is fully drained and a
failing row does not block progress.
@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown

@jcbl1 is attempting to deploy a commit to the vastsa's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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.

1 participant