8000 MORE Debug logging · arangodb/arangodb@06aabcd · GitHub
[go: up one dir, main page]

Skip to content

Commit 06aabcd

Browse files
committed
MORE Debug logging
1 parent f0787c8 commit 06aabcd

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

arangod/Scheduler/SupervisedScheduler.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,16 @@ class SupervisedScheduler final : public Scheduler {
7575
explicit WorkItem(std::function<void()>&& handler)
7676
: _handler(std::move(handler)), _startTime(TRI_microtime()), _called(false) {}
7777
~WorkItem() {
78-
if (!_called && (TRI_microtime() - _startTime) > 0.01) {
78+
if (!_called && (TRI_microtime() - _startTime) > 0.1) {
7979
LOG_TOPIC("hunde", ERR, arangodb::Logger::REPLICATION)
8080
<< "Work item forgotten, created at " << _startTime << " that is "
8181
<< (TRI_microtime() - _startTime) << "s ago.";
8282
}
8383
}
8484

85+
WorkItem(WorkItem const& other) = delete;
86+
WorkItem(WorkItem && other) = default;
87+
8588
void operator()() {
8689
_called = true;
8790
auto waittime = TRI_microtime() - _startTime;

arangod/Transaction/Methods.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1920,7 +1920,8 @@ OperationResult transaction::Methods::insertLocal(std::string const& collectionN
19201920
auto localTime = TRI_microtime() - startTime;
19211921
if (localTime > 0.4) {
19221922
LOG_TOPIC("hunde", ERR, Logger::REPLICATION)
1923-
<< "Local write slow, done after: " << localTime << "s";
1923+
<< "Local write slow, done after: " << localTime
1924+
<< "s on key: " << value.get(StaticStrings::KeyString).toJson();
19241925
}
19251926
if (res.ok() && replicationType == ReplicationType::LEADER) {
19261927
TRI_ASSERT(collection != nullptr);
@@ -1941,7 +1942,8 @@ OperationResult transaction::Methods::insertLocal(std::string const& collectionN
19411942
if (TRI_microtime() - startTime > 0.4) {
19421943
LOG_TOPIC("hunde", ERR, Logger::REPLICATION)
19431944
<< "Replication write slow, done after: " << (TRI_microtime() - startTime)
1944-
<< "s local used: " << localTime << "s";
1945+
<< "s local used: " << localTime
1946+
<< "s on key: " << value.get(StaticStrings::KeyString).toJson();
19451947
}
19461948
if (options.silent && countErrorCodes.empty()) {
19471949
// We needed the results, but do not want to report:

0 commit comments

Comments
 (0)
0