It all depends on the primary, not the replica(s).
If A arrives to the primary before B then change A will get (eg) version 2, and change B will get version 3. Theses changes are sent to the replica as the whole document, not just the update command.
If version 2 arrives before version, then they are both applied in order. If version 3 arrives before version 2 then version 3 is applied, and version 2 is silently rejected (because it is older than version 3).
Either way, the replica stays in sync with the primary.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.