Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-81613

Make OpObservers take less time when they aren't applicable

    • Replication
    • Fully Compatible
    • Repl 2023-10-16, Repl 2023-10-30, Repl 2023-11-13, Repl 2023-11-27, Repl 2023-12-11

      OpObservers run on every operation, and often a given op observer isn't applicable to a given operation. We should ensure they take as little time as possible when they aren't applicable.

      Specifically, OpObserverImpl should not create oplog entries when the oplog is disabled for the namespace (e.g. local, config.transactions, or on secondaries), nor should it access the TransactionParticipant or create a ShardingWriteRouter in this case.

      The ClusterServerParameter should not create a namespace string just to compare it with a pre-specified one.

      We should also have op observer microbenchmarks to measure this.

            Assignee:
            scott.li@mongodb.com Scott Li (Inactive)
            Reporter:
            matthew.russotto@mongodb.com Matthew Russotto
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: