meteor-rethinkdb icon indicating copy to clipboard operation
meteor-rethinkdb copied to clipboard

Write Fence: the synthetic event approach fails on a limited queries

Open Slava opened this issue 10 years ago • 0 comments

Since the synthetic event approach relies on changing a special document and then getting a notification about it in the same stream as the observe, this doesn't work on queries like r.table('cities').orderBy({index:'name'}).limit(3) if there are at least 3 documents we are interested in. Because the "special" doc is likely to get excluded, we will never receive any notifications about it. This way the write fence will never get released.

See https://github.com/Slava/meteor-rethinkdb/commit/e4fb0bb62376100b27497958fc2554b66e3000e9 for the commit with a failing test.

Solution: wait until Rethink releases a version like 2.2 that actually returns the revision numbers with every write and every change feed notification. This is unlikely to happen very soon.

Slava avatar May 11 '15 01:05 Slava