[SERVER-48013] Use atomics to reduce contention in hasSeenKeys() Created: 07/May/20  Updated: 29/Oct/23  Resolved: 12/May/20

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 4.4.0-rc6, 4.7.0

Type: Improvement Priority: Major - P3
Reporter: Amirsaman Memaripour Assignee: Amirsaman Memaripour
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Gantt Dependency
has to be done before SERVER-48142 Remove allowSkippingAppendRequiredFie... Backlog
has to be done before SERVER-48025 Cleanup and refactor LogicalTimeValid... Closed
Related
Backwards Compatibility: Fully Compatible
Backport Requested:
v4.4
Sprint: Service arch 2020-05-18
Participants:

 Description   

As part of processing incoming messages, mongos calls into appendRequiredFieldsToResponse through _processMessage (see here). Every mongos client thread spends about %5.8 of its time in this function while running a 100% read workload.

We should investigate possible modifications to this function to reduce its performance footprint on the critical execution path.



 Comments   
Comment by Githook User [ 13/May/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-48013 Use atomics to reduce contention in hasSeenKeys()

This commit simplifies the concurrency control in KeysCollectionManager and removes the
unnecessary invocation of shouldGossipLogicalTime() in appendRequiredFieldsToResponse().

(cherry picked from commit 79e004404e09c74d402d0b6d4604a48f1e2ca88d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/5fd4a092d6ff498c491302d2dfec178b09b47a8e

Comment by Githook User [ 13/May/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-48013 Use atomics to reduce contention in hasSeenKeys()

This commit simplifies the concurrency control in KeysCollectionManager and removes the
unnecessary invocation of shouldGossipLogicalTime() in appendRequiredFieldsToResponse().

(cherry picked from commit 79e004404e09c74d402d0b6d4604a48f1e2ca88d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/5fd4a092d6ff498c491302d2dfec178b09b47a8e

Comment by Githook User [ 13/May/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-48013 Use atomics to reduce contention in hasSeenKeys()

This commit simplifies the concurrency control in KeysCollectionManager and removes the
unnecessary invocation of shouldGossipLogicalTime() in appendRequiredFieldsToResponse().

(cherry picked from commit 79e004404e09c74d402d0b6d4604a48f1e2ca88d)
Branch: v4.4
https://github.com/mongodb/mongo/commit/5fd4a092d6ff498c491302d2dfec178b09b47a8e

Comment by Githook User [ 12/May/20 ]

Author:

{'name': 'Amirsaman Memaripour', 'email': 'amirsaman.memaripour@mongodb.com', 'username': 'samanca'}

Message: SERVER-48013 Use atomics to reduce contention in hasSeenKeys()

This commit simplifies the concurrency control in KeysCollectionManager and removes the
unnecessary invocation of shouldGossipLogicalTime() in appendRequiredFieldsToResponse().
Branch: master
https://github.com/mongodb/mongo/commit/79e004404e09c74d402d0b6d4604a48f1e2ca88d

Generated at Thu Feb 08 05:15:52 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.