Skip to content

Commit 3c24258

Browse files
jimwwalkertrondn
authored andcommitted
MB-58690: Change RangeScan create/complete logging
1) Only log create as DEBUG 2) Only log complete for failure or force cancelled cases Change-Id: I44568fb92186c54f82a26acdc52f6779b383bf58 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/197232 Reviewed-by: Trond Norbye <[email protected]> Tested-by: Build Bot <[email protected]>
1 parent 3b641b0 commit 3c24258

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

engines/ep/src/range_scans/range_scan.cc

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ RangeScan::RangeScan(
9393
}
9494
}
9595

96-
EP_LOG_INFO("{}: {} created. cid:{}, mode:{}{}{}",
97-
cookie.getConnectionId(),
98-
getLogId(),
99-
this->start.getDocKey().getCollectionID(),
100-
keyOnly == cb::rangescan::KeyOnly::Yes ? "keys" : "values",
101-
std::string_view{snapshotLog.data(), snapshotLog.size()},
102-
std::string_view{samplingLog.data(), samplingLog.size()});
96+
EP_LOG_DEBUG("{}: {} created. cid:{}, mode:{}{}{}",
97+
cookie.getConnectionId(),
98+
getLogId(),
99+
this->start.getDocKey().getCollectionID(),
100+
keyOnly == cb::rangescan::KeyOnly::Yes ? "keys" : "values",
101+
std::string_view{snapshotLog.data(), snapshotLog.size()},
102+
std::string_view{samplingLog.data(), samplingLog.size()});
103103
}
104104

105105
RangeScan::RangeScan(cb::rangescan::Id id, KVStoreScanTracker& resourceTracker)
@@ -134,7 +134,13 @@ RangeScan::~RangeScan() {
134134

135135
auto cs = *continueState.rlock();
136136

137-
EP_LOG_INFO(
137+
auto level = spdlog::level::level_enum::debug;
138+
if (cs.finalStatus != cb::engine_errc::range_scan_complete) {
139+
level = spdlog::level::level_enum::warn;
140+
}
141+
142+
EP_LOG_FMT(
143+
level,
138144
"{} finished in {} status:{}, after {}ms, continued:{}, keys:{}{}",
139145
getLogId(),
140146
cs.state,

0 commit comments

Comments
 (0)