更改源是否可以无序返回更改?

Can changes be returned out-of-order for change feeds?

如果可以并行发生许多写查询,两个更改源订阅者是否可以看到相同的更改集但顺序不同,或者看到更改但不是 "chronological"命令。例如更改 A 在 B 之前提交,但更改提要订阅者先收到更改 B,然后再收到更改 A。

是的,更改可能是乱序的:

  1. In many cases different shards have their Primaries on different servers. So the messages containing changes from that shard may arrive at different times to the machine hosting the changefeed they may be acted on in different orders. Additionally there are some internal details to how messages are handled inside each server that might wind up in differing orders even on messages from the same shard. However, we have logic in that system to guarantee that for a given id we will always see the changes in the right order, so you will never see data moving backwards in time.

  2. In an attempt to reduce the amount of network traffic on highly volatile data we have the concept of squashing, where the server handling the changefeed combines multiple changes to a since document into a single entry before sending it along. The exact output of that squashing is very sensitive to exact timing (and to caching behaviors in the clients [2]), and so there is a relatively good chance that you would see different points-in-times in the entries for very active values.

https://github.com/rethinkdb/rethinkdb/issues/5969#issuecomment-233420705