[SERVER-74526] Change stream opened against a secondary node uses a lot of CPU even when there is no write load Created: 01/Mar/23 Updated: 29/Oct/23 Resolved: 03/Mar/23 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Change streams, Query Execution |
| Affects Version/s: | 6.3.0-rc0 |
| Fix Version/s: | 7.0.0-rc0, 6.3.0-rc1 |
| Type: | Bug | Priority: | Critical - P2 |
| Reporter: | David Storch | Assignee: | David Storch |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||
| Assigned Teams: |
Query Execution
|
||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||
| Backport Requested: |
v6.3
|
||||||||||||||||||||
| Steps To Reproduce: | Start a 2-node replica set. I'm doing it like so:
Then connect to the secondary node and start watching a change stream on an arbitrary non-existent collection:
You should be able to see the secondary node's CPU utilization spike. The CPU will become idle again if you stop iterating the change stream cursor. |
||||||||||||||||||||
| Sprint: | QE 2023-03-06 | ||||||||||||||||||||
| Participants: | |||||||||||||||||||||
| Linked BF Score: | 20 | ||||||||||||||||||||
| Description |
|
The changes from The changes from Again, this happens only for change streams opened against secondary nodes, not for change streams opened against primary nodes. I speculate it has something to do with differing behavior between primary and secondary nodes for how we choose which timestamp to read from? |
| Comments |
| Comment by Githook User [ 03/Mar/23 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: This reverts commit 34ac49477b87e183637f68cda828ecff8b393c64. Future |
| Comment by Githook User [ 02/Mar/23 ] |
|
Author: {'name': 'David Storch', 'email': 'david.storch@mongodb.com', 'username': 'dstorch'}Message: This reverts commit 34ac49477b87e183637f68cda828ecff8b393c64. Future |
| Comment by David Storch [ 02/Mar/23 ] |
|
The proposed fix is to revert the changes from |