As Mongo promises consistency which means Every read receives the most recent write or an error
Does it means When mongo says commit is done then data has been written to all slaves also in synchronous fashion as then only it can promise the consistency ?
Mongo also provides asynchronous replication, which means there will be replication lag b/w master and slave. hence consistency can't be promised. So how Mongo says it provides consistency ?
Update :-
As I understand from Where does mongodb stand in the CAP theorem? is that Mongo provides consistency when system is is a single-master system and all reads go to the primary by default.
But When optionally enable to read from the secondaries then MongoDB becomes eventually consistent where it's possible to read out-of-date results. So there is possiblity that Mongo system is inconsistent in betweena and does not provide the latest written data.