[SERVER-81613] Make OpObservers take less time when they aren't applicable Created: 02/Oct/23  Updated: 24/Jan/24  Resolved: 07/Dec/23

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 7.3.0-rc0

Type: Improvement Priority: Major - P3
Reporter: Matthew Russotto Assignee: Scott Li
Resolution: Fixed Votes: 0
Labels: perf-8.0, perf-tiger, perf-tiger-handoff, perf-tiger-q4
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-84181 Skip creating oplog entry for unrepli... Closed
is related to SERVER-81569 Improve performance of NamespaceString In Code Review
Assigned Teams:
Replication
Backwards Compatibility: Fully Compatible
Sprint: Repl 2023-10-16, Repl 2023-10-30, Repl 2023-11-13, Repl 2023-11-27, Repl 2023-12-11
Participants:

 Description   

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.



 Comments   
Comment by Githook User [ 07/Dec/23 ]

Author:

{'name': 'Scott Li', 'email': 'scott.li@mongodb.com', 'username': ''}

Message: SERVER-81613 Check isOplogDisabledFor before oplog operations for CRUD op observers

GitOrigin-RevId: e491b2cdfa1f4e303a1fff3124bfedabdc08c68c
Branch: master
https://github.com/mongodb/mongo/commit/6b6198b48831ef8de80d47b1e1b28eba34ce2ca2

Generated at Thu Feb 08 06:46:59 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.