Does query advance Logical Time in MongoDB?

No, query/read cannot advance the cluster’s time. It can update a particular node’s view of what current cluster time is. But that doesn’t advance the time.

Think of it this way. You are node 1. You think it’s T1. Meanwhile node 2 has taken several writes advancing the cluster time to T3. Next request, no matter what it is to node 1 will notify node 1 that the current cluster time is T3 not T1. That does not advance the cluster clock that just catches up node 1 which was snoozing and didn’t realize that the cluster time has advanced.

There is no such thing as multiple cluster times. There is one. Not all nodes/clients may realize where it is at a particular point and they can learn about it with any communication even one that doesn’t involve any query.

1 Like