summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaria van Keulen <maria.vankeulen@mongodb.com>2020-01-23 19:09:47 +0000
committerevergreen <evergreen@mongodb.com>2020-01-23 19:09:47 +0000
commit45e61497a30531e816b4d999c53d6cbaa39279a2 (patch)
tree663a0304e59ba5eba47f774f7d2542765f1e73c5
parent57bc8ba0a20c876d066109bc471c350022bf8c09 (diff)
downloadmongo-45e61497a30531e816b4d999c53d6cbaa39279a2.tar.gz
SERVER-45662 Update Flow Control timeAcquiringMicros in currentOp
This patch also bumps the RamLog byte limit for log lines to be 2048 bytes per line to allow checkLog-based tests to pass as of this change.
-rw-r--r--src/mongo/db/concurrency/flow_control_ticketholder.cpp4
-rw-r--r--src/mongo/logger/ramlog.h2
-rw-r--r--src/mongo/logv2/ramlog.h2
3 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/concurrency/flow_control_ticketholder.cpp b/src/mongo/db/concurrency/flow_control_ticketholder.cpp
index b8f6217665c..4a8057159e1 100644
--- a/src/mongo/db/concurrency/flow_control_ticketholder.cpp
+++ b/src/mongo/db/concurrency/flow_control_ticketholder.cpp
@@ -101,7 +101,9 @@ void FlowControlTicketholder::getTicket(OperationContext* opCtx,
auto currentWaitTime = curTimeMicros64();
auto updateTotalTime = [&]() {
auto oldWaitTime = std::exchange(currentWaitTime, curTimeMicros64());
- _totalTimeAcquiringMicros.fetchAndAddRelaxed(currentWaitTime - oldWaitTime);
+ auto waitTimeDelta = currentWaitTime - oldWaitTime;
+ _totalTimeAcquiringMicros.fetchAndAddRelaxed(waitTimeDelta);
+ stats->timeAcquiringMicros += waitTimeDelta;
};
stats->waiting = true;
diff --git a/src/mongo/logger/ramlog.h b/src/mongo/logger/ramlog.h
index e737663083c..49f6fd140b5 100644
--- a/src/mongo/logger/ramlog.h
+++ b/src/mongo/logger/ramlog.h
@@ -114,7 +114,7 @@ private:
enum {
N = 1024, // number of lines
- C = 1024 // max size of line
+ C = 2048 // max size of line
};
const char* getLine_inlock(unsigned lineNumber) const;
diff --git a/src/mongo/logv2/ramlog.h b/src/mongo/logv2/ramlog.h
index 5feba166044..edde0861911 100644
--- a/src/mongo/logv2/ramlog.h
+++ b/src/mongo/logv2/ramlog.h
@@ -108,7 +108,7 @@ private:
enum {
N = 1024, // number of lines
- C = 1024 // max size of line
+ C = 2048 // max size of line
};
const char* getLine_inlock(unsigned lineNumber) const;