[SERVER-18347] Move client-related information in thread local storage into client decorations Created: 06/May/15  Updated: 14/Oct/18  Resolved: 13/Sep/18

Status: Closed
Project: Core Server
Component/s: Networking
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Andrew Morrow (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-18348 Remove uses of TSP_DEFINE Closed
Participants:

 Description   

Some of the information stored in thread_specific_ptr objects is tied to the client object, this information should be hung off the client instead.



 Comments   
Comment by Andrew Morrow (Inactive) [ 13/Sep/18 ]

I'm closing this as gone away. The indicated work was completed by the project to separate the network and database layers, since that layer is able to rebind clients to different worker threads over time.

Comment by Andrew Morrow (Inactive) [ 30/Jun/15 ]

Kicking this out to 3.3 required since the db worker threads project was cut from 3.2, and this ticket was a pre-requisite. The mongod side of it is complete, but the mongos side is not.

Comment by Githook User [ 09/Jun/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-18347 Store authorized connection in copydb as a client decoration
Branch: master
https://github.com/mongodb/mongo/commit/37536d44ad39ccf97c217e129967264b48e3fbe8

Comment by Githook User [ 09/Jun/15 ]

Author:

{u'username': u'acmorrow', u'name': u'Andrew Morrow', u'email': u'acm@mongodb.com'}

Message: SERVER-18347 Attach ShardedConnectionInfo as a client decoration
Branch: master
https://github.com/mongodb/mongo/commit/60654439cb99b7a3e6cf4db470b7dadc89acfdb5

Comment by Andrew Morrow (Inactive) [ 08/Jun/15 ]

In addition to boost thread_specific_ptr, the other category of thread locals that we have are declared via the TSP_DECLARE and TSP_DEFINE macros. However, a quick audit reveals that there are only the following usages:

  • src/mongo/db/client.cpp, for the actual attachment of the client to the thread. This one we want to keep.
  • src/mongo/logger/logstream_builder.cpp. This is the cached osteam that the logger uses, so this is not client specific and does not need to change.
  • src/mongo/db/storage/mmap_v1/record_access_tracker.cpp. This one many warrant some investigation.
  • src/mongo/util/fail_point.cpp. Not client specific.
Generated at Thu Feb 08 03:47:23 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.