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

Closed
wants to merge 85 commits into from

Conversation

fregataa
Copy link
Member

@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. The progress data of background task will contain log_level field
  • Apply asyncio.Semaphore to limit too many concurrent deletion task for one storage-proxy process and apply 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 this to the 24.03 milestone 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
@fregataa fregataa modified the milestones: 24.09, 23.03, 24.03 Jun 14, 2024
@github-actions github-actions bot modified the milestones: 24.03, 24.09 Jun 14, 2024

async with aiotools.TaskGroup() as tg:
for _, vfolder_iterator in itertools.groupby(
sorted(requested_vfolders, key=_keyfunc), key=_keyfunc
Copy link
Member

Choose a reason for hiding this comment

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

In this case, using typing.Iterable seems more suitable than typing.Sequence for requested_vfolders.
(ref: https://docs.python.org/3/library/functions.html#sorted)

@fregataa
Copy link
Member Author

replaced by #2737, #2738, #2739

@fregataa fregataa closed this Aug 20, 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)
4 participants