Hi
I have 3 nodes in replica set. Lets say A is primary and B, C are secondary.
I have configured write concern as “majority”
{ w : “majority” }
I have configured read preference as “Read from secondary”.
Now lets say at time
t1 - A , B and C are consitent
t2 - write happens
t3 - A, B are consistent and not C (due to write majority)
Question 1
t4- If we do read, from which secondary node (B or C) read is served ? what technique is used by default ? Is it from B as it has latest update ?
Is it from C ? If this happens i might get stale data. Not wanted to happen.
Question 2
And also could you please explain maxStalenessSeconds
when does maxStaleness comes into picture if lag is compared against primary node last write and secondary node last write ?
To comapre we have two entities primary time and secondary time ? what is the role of maxStaleness