Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve reliability & usability of VFolder removal API #1884

Open
wants to merge 71 commits into
base: main
Choose a base branch
from

Conversation

fregataa
Copy link
Contributor

@fregataa fregataa commented Feb 4, 2024

resolves #1797

blocked by #1892

we do not need to back-port Graphene relay node part to 23.09. We are now able to backport relay node impl to 23.09
Let's not backport this PR

  • Enable to track VFolder deletion task through Backgruond task
  • Apply asyncio.Semaphore to limit too many concurrent deletion task and File-lock to limit concurrent deletion on the same directory
    Add move_to_trash_vfolder, restore_vfolder, delete_forever_vfolder and purge_vfolder GraphQL endpoints
    Adding GQL APIs will be handled in another PR

Checklist: (if applicable)

  • Milestone metadata specifying the target backport version
  • Mention to the original issue
  • Update of end-to-end CLI integration tests in ai.backend.test
  • API server-client counterparts (e.g., manager API -> client SDK)
  • Test case(s) to:
    • Demonstrate the difference of before/after
    • Demonstrate the flow of abstract/conceptual models with a concrete implementation

📚 Documentation preview 📚: https://sorna--1884.org.readthedocs.build/en/1884/


📚 Documentation preview 📚: https://sorna-ko--1884.org.readthedocs.build/ko/1884/

@fregataa fregataa added this to the 23.09 milestone Feb 4, 2024
@fregataa fregataa self-assigned this Feb 4, 2024
@github-actions github-actions bot added comp:manager Related to Manager component size:L 100~500 LoC labels Feb 4, 2024
@github-actions github-actions bot added the comp:storage-proxy Related to Storage proxy component label Feb 6, 2024
@achimnol
Copy link
Member

achimnol commented Feb 22, 2024

Need to limit the concurrent deletion jobs for each vfolder to one and the maximum concurrent number of vfolder deletion jobs for each storage volume (configurable, defaults to 20) as a storage-proxy configuration.

@fregataa fregataa changed the title feature: improve VFolder purge using background task feature: improve VFolder deletion using background task Feb 24, 2024
@fregataa fregataa marked this pull request as ready for review February 24, 2024 10:26
@fregataa fregataa changed the title feature: improve VFolder deletion using background task enhance: VFolder deletion using background task Feb 24, 2024
@github-actions github-actions bot added size:L 100~500 LoC and removed size:XL 500~ LoC labels Apr 16, 2024
src/ai/backend/client/cli/vfolder.py Show resolved Hide resolved
src/ai/backend/client/func/vfolder.py Outdated Show resolved Hide resolved
src/ai/backend/common/bgtask.py Outdated Show resolved Hide resolved
src/ai/backend/manager/models/vfolder.py Outdated Show resolved Hide resolved
src/ai/backend/manager/models/vfolder.py Outdated Show resolved Hide resolved
src/ai/backend/manager/models/vfolder.py Outdated Show resolved Hide resolved
src/ai/backend/storage/config.py Outdated Show resolved Hide resolved
@github-actions github-actions bot added area:docs Documentations comp:common Related to Common component comp:cli Related to CLI component labels Apr 29, 2024
@fregataa fregataa modified the milestones: 24.03, 23.09, 24.09 Apr 29, 2024
@github-actions github-actions bot modified the milestones: 24.09, 24.03 May 1, 2024
@fregataa fregataa modified the milestones: 24.03, 24.09 May 8, 2024
@fregataa fregataa added urgency:4 As soon as feasible, implementation is essential. and removed urgency:blocker IT SHOULD BE RESOLVED BEFORE NEXT RELEASE! labels May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:docs Documentations comp:cli Related to CLI component comp:client Related to Client component comp:common Related to Common component comp:manager Related to Manager component comp:storage-proxy Related to Storage proxy component size:L 100~500 LoC type:enhance Enhance component, behavior, internals without user-facing features urgency:4 As soon as feasible, implementation is essential.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reliable VFolder deletion(purge)
3 participants