diff --git a/jstests/concurrency/fsm_libs/worker_thread.js b/jstests/concurrency/fsm_libs/worker_thread.js
|
index 83f0384562..7fe586f12c 100644
|
--- a/jstests/concurrency/fsm_libs/worker_thread.js
|
+++ b/jstests/concurrency/fsm_libs/worker_thread.js
|
@@ -84,6 +84,25 @@ var workerThread = (function() {
|
}
|
}
|
|
+ {
|
+ let res = assert.commandWorked(myDB.runCommand({whatsmyuri: 1}));
|
+ const myUri = res.you;
|
+
|
+ res = assert.commandWorked(myDB.adminCommand({currentOp: 1, client: myUri}));
|
+ const threadName = res.inprog[0].desc;
|
+ const connectionId = res.inprog[0].connectionId;
|
+
|
+ const printOriginal = print;
|
+ print = function() {
|
+ const printArgs = Array.from(arguments);
|
+ // XXX: We reconstruct the thread name using the "connectionId" field rather
|
+ // than using the "desc" field outright to work around SERVER-32498.
|
+ const prefix = "!!! tid=" + args.tid + ", conn=conn" + connectionId + ":";
|
+ printArgs.unshift(prefix);
|
+ return printOriginal.apply(this, printArgs);
|
+ };
|
+ }
|
+
|
if (Cluster.isReplication(args.clusterOptions)) {
|
// Operations that run after a "dropDatabase" command has been issued may fail with
|
// a "DatabaseDropPending" error response if they would create a new collection on
|