Skip to content

v2.0.9

Choose a tag to compare

@danmacko danmacko released this 10 Jun 13:54

Maintained fork of cottz:publish-relations
by lfades (MIT).

This bugfix release fixes the long-standing oplog error from this.join():

The Mongo server and the Meteor query disagree on how many documents match your query

Fixes

  • Stop leaked join observers — when a join cursor was re-issued with a new
    selector, the previous observeChanges handler was overwritten without being
    stopped, leaving a stale observer running against an older $in selector. It
    is now stopped before being replaced.
  • Shrink the join $in on contributor removal — joined ids were only ever
    added, never released, so the $in grew without bound on long-lived / busy
    subscriptions and eventually diverged from Mongo during oplog reconciliation.
    The $in is now refcounted per joined id and shrinks when contributor
    documents are removed (dropped documents are explicitly retracted from the
    client), while staying fully reactive.

Fully backwards compatible with cottz:publish-relations — same API.