You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Using a changefeed with a geo intersection filter fails #4063
@AtnNn, @reidja and I had briefly discussed this on IRC.
intersects is non-deterministic because it can give different results on different servers. However in contrast to some other non-deterministic operations (like accessing another table, or random operations), it is deterministic per server.
@mlucy do changefeeds like these actually require that the function is deterministic across servers?
If not, I propose that we make the non-determinism flag for terms more fine-grained to allow this.
We should also consider how this will interact with resumable changefeeds in the future, especially for the case where we support resuming a changefeed after an old primary has gone down.
An ignoreNonDeterminism flag might work, but we should understand (and explain) very well which consequences that can have. In the case of updates we can provide nonAtomic because we can actually fall back to an alternative processing scheme which maintains all guarantees, except for atomicity.
As long as you use a single server and you don't use intersects in a secondary index function (geo indexes and getIntersecting are ok), it should be safe.
@danielmewes -- we can make it work as long as it's deterministic per-server. I agree we should make our notion of nodeterminism more granular to allow for this.
@knownasilya Sorry, no update yet. We're trying to get this into the 2.2.0 release, but I can't promise it yet (there are a bunch of other really important features that we're trying to get in as well).
Activity
danielmewes commentedon Apr 15, 2015
Thanks for opening the issue @reidja.
@AtnNn, @reidja and I had briefly discussed this on IRC.
intersectsis non-deterministic because it can give different results on different servers. However in contrast to some other non-deterministic operations (like accessing another table, or random operations), it is deterministic per server.@mlucy do changefeeds like these actually require that the function is deterministic across servers?
If not, I propose that we make the non-determinism flag for terms more fine-grained to allow this.
We should also consider how this will interact with resumable changefeeds in the future, especially for the case where we support resuming a changefeed after an old primary has gone down.
An
ignoreNonDeterminismflag might work, but we should understand (and explain) very well which consequences that can have. In the case of updates we can providenonAtomicbecause we can actually fall back to an alternative processing scheme which maintains all guarantees, except for atomicity.danielmewes commentedon Apr 15, 2015
@reidja Here's a quick work-around if you're building from source (instructions: http://rethinkdb.com/docs/build/). Apply this patch to the branch
v2.0.x:As long as you use a single server and you don't use
intersectsin a secondary index function (geo indexes andgetIntersectingare ok), it should be safe.mlucy commentedon Apr 15, 2015
@danielmewes -- we can make it work as long as it's deterministic per-server. I agree we should make our notion of nodeterminism more granular to allow for this.
danielmewes commentedon Apr 16, 2015
Ok sounds like we have a solution then. Assuming it's not super complicated, we should try to implement it for 2.1.
reidja commentedon Apr 16, 2015
This is awesome, worked like a charm. Thank you @danielmewes
temporary workaround for geo changefeeds until rethinkdb#4063 is reso…
knownasilya commentedon Sep 11, 2015
What's the status on this?
danielmewes commentedon Sep 11, 2015
@knownasilya Sorry, no update yet. We're trying to get this into the 2.2.0 release, but I can't promise it yet (there are a bunch of other really important features that we're trying to get in as well).
encryptio commentedon Nov 3, 2015
In review with @danielmewes, CR 3308
Add nuanced deterministic_t: geo terms are allowed in changefeeds but…