PBM restore failure -- missing required partialFilterExpression on the creates

I’ve got a restore I’m trying to do - and it’s failing due to PBM not providing the partialFilterExpression during the createIndexes() operation.

This is resulting in the index create failing and the restore subsequently failing.

Here’s the index definition:

  {
    v: 2,
    key: { siteId: 1, hubspotVisitorId: 1 },
    name: 'siteId_1_hubspotVisitorId_1',
    unique: true,
    partialFilterExpression: { hubspotVisitorId: { '$exists': true } }
  }

The issue is that hubspotVisitorId has LOTS of nulls. This index is only for documents that DO have a value. Without that restriction, the unique: true fails.

There was a forum post from 2022 about partialFilterExpression not getting applied when it was {} - but that isn’t the case here.

For indexes where the partialFilterExpression is provided and there is NOT a unique constraint, the restore will likely work, but the resulting index won’t be the correct content. That likely will just be an inefficiency though, not an outright failure.

Filed bug as well: PBM-1479

Is there any way to get the restore process to continue after that index create failure?

Hi, thanks for filing the bug. The dev team will look into this. Unfortunately there is no way to ignore the error and continue with the restore