Improve insert_vector secondary performance

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Replication
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-39950 we merged some redundant code paths between sync tail and initial sync. In doing so we lost some optimizations which affect the insert_vector test performance on secondaries.

      The largest effect is probably the extra copy of the batch here

      https://github.com/10gen/mongo/blob/857e5ff84b57167abcfb875c56a3cda1464de563/src/mongo/db/repl/oplog_batcher.cpp#L296

      But also note this pre-allocation may not be useful after removing that

      https://github.com/10gen/mongo/blob/8c11a9d7c59a156619ba387be14eb584f979442a/src/mongo/db/repl/oplog_batcher.h#L50

      whereas pre-allocation here may be helpful

      https://github.com/10gen/mongo/blob/857e5ff84b57167abcfb875c56a3cda1464de563/src/mongo/db/repl/oplog_batcher.cpp#L160

              Assignee:
              [DO NOT USE] Backlog - Replication Team
              Reporter:
              Matthew Russotto
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: