Skip to content

Bucket shadower ignores mutations with non-zero expiry #1161

@daverigby

Description

@daverigby

As per subject, the Bucket Shadower (https://github.com/couchbase/sync_gateway/blob/master/src/github.com/couchbase/sync_gateway/db/shadower.go#L74) currrently skips any TAP mutations which have a non-zero expiry:

if !isDeletion && event.Expiry > 0 {
    break // ignore ephemeral documents
}

From speaking to @ajres he notes that:

... I think the reason they are ignored is that SG does not get notified when a CBS doc is expired which would result in an inconsistency between the SG bucket and shadow bucket.

While this may be true, this is problematic for any use-case which uses non-zero expiries; these aren't necessarily "ephemeral" - an expiry could be many years in the future...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions