vmware-tanzu / velero

Backup and migrate Kubernetes applications and their persistent volumes
https://velero.io
Apache License 2.0
8.41k stars 1.37k forks source link

Make BackedUpItems thread safe #7148

Open anshulahuja98 opened 7 months ago

anshulahuja98 commented 7 months ago

Describe the problem/challenge you have

Tracking issue to make BackedUpItems thread safe.

Describe the solution you'd like

If we wish to achieve any level of concurrency across backup operations or restore operations, we need to make sure all of the intermediate trackers which are used are thread safe such that they don't run into concurrency issue.

Similar to the impl of SkippedPvTracker - https://github.com/vmware-tanzu/velero/blob/a9e80d585ad83884e271d595d3aba0b21bb01da3/pkg/backup/pv_skip_tracker.go#L43 We need to implement BackupUpItems tracker https://github.com/vmware-tanzu/velero/blob/5d81317d5e0c4efc91e76cdbaad56ce21eed2456/pkg/backup/item_backupper.go#L170C1-L171C63 with mutex lock such that multiple operations can update the status in parallel without concurrency issues. Setting ground work for: https://github.com/vmware-tanzu/velero/issues/6165 | https://github.com/vmware-tanzu/velero/pull/6860

Anything else you would like to add:

Environment:

Vote on this issue!

This is an invitation to the Velero community to vote on issues, you can see the project's top voted issues listed here.
Use the "reaction smiley face" up to the right of this comment to vote.

reasonerjt commented 5 months ago

@anshulahuja98 I know we had some discussion but could you add more details in this issue to make it more self-contained?

anshulahuja98 commented 5 months ago

Updated the issue description. @reasonerjt we can mark this as backlog for now, we don't need to track in 1.14 I'll meanwhile try to get someone from my team to work on this.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days. If a Velero team member has requested log or more information, please provide the output of the shared commands.