Files
velero/pkg/util
Shubham Pampattiwar bcdc30b59a Add PVC-to-Pod cache to improve volume policy performance
The GetPodsUsingPVC function had O(N*M) complexity - for each PVC,
it listed ALL pods in the namespace and iterated through each pod.
With many PVCs and pods, this caused significant performance
degradation (2+ seconds per PV in some cases).

This change introduces a PVC-to-Pod cache that is built once per
backup and reused for all PVC lookups, reducing complexity from
O(N*M) to O(N+M).

Changes:
- Add PVCPodCache struct with thread-safe caching in podvolume pkg
- Add NewVolumeHelperImplWithCache constructor for cache support
- Build cache before backup item processing in backup.go
- Add comprehensive unit tests for cache functionality
- Graceful fallback to direct lookups if cache fails

Fixes #9179

Signed-off-by: Shubham Pampattiwar <spampatt@redhat.com>
2025-12-15 14:18:05 -08:00
..
2025-12-02 12:28:03 -05:00
2025-10-09 14:13:43 -04:00
2025-01-17 07:58:10 +01:00
2025-11-24 17:21:00 +08:00
2025-06-26 08:05:50 +02:00
2025-12-02 12:28:03 -05:00
2024-04-10 14:53:29 +08:00
2025-09-11 13:04:24 +08:00
2024-04-10 14:53:29 +08:00
2025-02-25 10:44:45 +08:00