[SERVER-63614] Refactor the mongod startup sequence for hybrid mode Created: 14/Feb/22  Updated: 29/Oct/23  Resolved: 10/Mar/22

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

Type: Task Priority: Major - P3
Reporter: Andrew Shuvalov (Inactive) Assignee: Kshitij Gupta
Resolution: Fixed Votes: 0
Labels: sharding-nyc-subteam2, sharding-nyc-subteam2-catalog-poc
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-63598 Umbrella ticket for minimal POC for o... Closed
Backwards Compatibility: Fully Compatible
Participants:
Story Points: 7

 Comments   
Comment by Kshitij Gupta [ 10/Mar/22 ]

merged to the POC branch.

Comment by Andrew Shuvalov (Inactive) [ 03/Mar/22 ]

Logging code hack that helps investigating stuck threads:

index 188ede8032a..21371be86f1 100644
--- a/src/mongo/logv2/log_detail.cpp
+++ b/src/mongo/logv2/log_detail.cpp
@@ -31,6 +31,9 @@
 
 #include "mongo/platform/basic.h"
 
+#include <sys/types.h>
+#include <unistd.h>
+#include <sys/syscall.h>
 #include <fmt/format.h>
 
 #include "mongo/db/tenant_id.h"
@@ -163,10 +166,12 @@ void doLogImpl(int32_t id,
                                      options.truncation(),
                                      options.uassertErrorCode());
     if (record) {
+        pid_t tid = syscall(__NR_gettid);
+        auto msg = message + " " + std::to_string(tid);
         record.attribute_values().insert(
             attributes::message(),
             boost::log::attribute_value(
-                new boost::log::attributes::attribute_value_impl<StringData>(message)));
+                new boost::log::attributes::attribute_value_impl<StringData>(msg)));
 
         record.attribute_values().insert(
             attributes::attributes(),

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