Skip to content

feat: deduplicate Archive object references#71

Open
ermakov-oleg wants to merge 1 commit intooperasoftware:mainfrom
ermakov-oleg:feat/archive-ref-dedup
Open

feat: deduplicate Archive object references#71
ermakov-oleg wants to merge 1 commit intooperasoftware:mainfrom
ermakov-oleg:feat/archive-ref-dedup

Conversation

@ermakov-oleg
Copy link

Summary

Port of upstream #331

Problem: GetReferredArchiveObjectsKey() returned all three possible archive references (primary, recovery, replica source) without deduplication. In common setups, the same Archive object is used for multiple purposes (e.g. primary and recovery point to the same object). This caused the reconciler to fetch and process the same Archive object 2-3 times per reconciliation loop, wasting API calls and potentially causing race conditions.

Fix: Added deduplication using a seen map — each unique NamespacedName is only included once in the result. The function now returns at most 3 items, but typically 1-2 in real deployments where archives are shared.

…e projections

Port of upstream PR cloudnative-pg#331. When the same Archive is referenced multiple
times (e.g. as both archive and recovery), volume projections were
duplicated causing Job creation failures.

Signed-off-by: ermakov-oleg <ermakovolegs@gmail.com>
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