[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: |
|
||||||||||||
| 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: GitOrigin-RevId: e491b2cdfa1f4e303a1fff3124bfedabdc08c68c |