Possibly incorrect namespaces exclude

Description

I’ve not tested the impact of the following code https://github.com/percona/percona-backup-mongodb/blob/main/pbm/snapshot/restore.go#L110-L120 but it looks like it tries to merge 2 slices incorrectly and as a result, it ends up with the “old” slice being used (the one created in the if-bloc is dropped at the end of it).

Due to this behavior defined config collections are never excluded (https://go.dev/play/p/Yq4Sna5pVCI )

Environment

None

Activity

Boris Ilijic March 19, 2025 at 10:36 AM

This fix the issue when PBM’s system collections: pbmCmd, pbmLog, pbmConfig are not excluded from restore.

 

Thank you for reporting this bug, as well as, for provided fix.

Details

Assignee

Reporter

Needs QA

Yes

Components

Fix versions

Priority

Smart Checklist

Created March 18, 2025 at 4:39 PM
Updated yesterday

Flag notifications