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
Actually ignore that. I think it could work technically with a bit of a redesign (that is some significant redesign of how we do range reads and writes on the cluster level).
Activity
danielmewes commentedon Dec 19, 2014
Yes. If you change the field that you are selecting by this can definitely happen.
danielmewes commentedon Dec 19, 2014
I suppose that's an argument in favor of always using distinct semantics (#3462) whenever a query updates on a secondary-index based selection...
nviennot commentedon Dec 19, 2014
I'd rather have the DB to provide decent isolation properties, which shouldn't be hard to provide given the MVCC underlying engine.
danielmewes commentedon Dec 19, 2014
@nviennot It's feasible for read queries, but a lot more difficult for writes.
danielmewes commentedon Dec 19, 2014
Actually ignore that. I think it could work technically with a bit of a redesign (that is some significant redesign of how we do range reads and writes on the cluster level).
nviennot commentedon Dec 19, 2014
It would be great that any cursor actually reads from a snapshot of the DB, otherwise subtle bugs can arise.
nviennot commentedon Dec 20, 2014
Try this:
{:field => i}where i goes from 1 to 300,000.fieldr.table("test").between(0, nil, "index" => :field).update { |doc| { :field => doc[:field] + 300000 } } }[-]Consistency Question[/-][+]Cursor Stability, Internal Snapshots, MVCC[/+]mlucy commentedon Dec 20, 2014
That last bit is definitely a bug; closing the connection should abort the query.
nviennot commentedon Dec 20, 2014
I was wrong abut the last bit, I ctrl+c in the console, which interrupted the query, but the connection was left open. Still, it's funky behavior.