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
Consider the query r.table("t").update({a: "foo"}) on a sharded table "t".
Currently we request one batch of keys from each shard. Then we discard all but the one that is lowest in the key space. Then we send out updates to only that first shard.
We then repeat this until no keys are left to be processed in the first shard, and a similar thing happens for the remaining shards.
This has two problems:
a) It wastes a lot of resources on the shards because the same batch is requested and then discarded over and over.
b) It makes the query slower because each batch of updates only goes to a single shard, rather than being spread across multiple shards (this was noticed by @ha1331).
The first part of the problem I think applies to all kinds of sorted and unsorted streams in RethinkDB, not just to writes.
Bumping this to 2.2. It's about 70% done, and the logic is already sufficiently different that I don't think I'd be comfortable putting this into a point release. (A lot of the lazy datum stream logic ended up completely rewritten, and that's been a source of bugs in the past.)
Consider the query
r.table("t").update({a: "foo"})
on a sharded table "t".Currently we request one batch of keys from each shard. Then we discard all but the one that is lowest in the key space. Then we send out updates to only that first shard.
We then repeat this until no keys are left to be processed in the first shard, and a similar thing happens for the remaining shards.
This has two problems:
a) It wastes a lot of resources on the shards because the same batch is requested and then discarded over and over.
b) It makes the query slower because each batch of updates only goes to a single shard, rather than being spread across multiple shards (this was noticed by @ha1331).
The first part of the problem I think applies to all kinds of sorted and unsorted streams in RethinkDB, not just to writes.
Assigning @mlucy
The text was updated successfully, but these errors were encountered: