Behaviour of replication, and reading from secondaries

XMLWordPrintableJSON

    • Type: Question
    • Resolution: Done
    • Priority: Minor - P4
    • None
    • Affects Version/s: 2.4.6
    • Component/s: Replication
    • None
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      I would like to understand the behaviour of writes as they are replicated across to secondaries to confirm or debunk my understanding.

      In our situation we write batches of individual documents in what we call a snapshot, related by a field in each containing the snapshot id. When we have completed writing a batch (20k+) of documents, we 'close' the snapshot by updating an additional snapshot document, which contains meta data about when, by whom, and the state of the snapshot. At that point no more documents can be written into that snapshot. None of the documents that make up the snapshot can be mutated at any point.

      Am I correct in thinking that all writes to the primary are replayed in exactly the same order to the secondary, from the oplog. If this statement holds true, I can then assume that once i 'see' that snapshot as 'closed' in the secondary, I can be sure that all the documents have also been replicated to the secondary.

            Assignee:
            Unassigned
            Reporter:
            simon
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: