Skip to content

Commit 8d2f9ff

Browse files
committed
Improve LoadStorageKVPairCallback::callback logging
Improve the logging in LoadStorageKVPairCallback::callback, so its clear which function the log message is from and what vbucket we're loading for. As currently we can just have repeated log message that give no context to which vbucket there for. Change-Id: If3828e0444393eb855b8d039ca995309f05c34d1 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/164050 Tested-by: Build Bot <[email protected]> Reviewed-by: Dave Rigby <[email protected]>
1 parent 0b48f5e commit 8d2f9ff

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

engines/ep/src/warmup.cc

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -999,26 +999,34 @@ void LoadStorageKVPairCallback::callback(GetValue& val) {
999999
if (retry == 2) {
10001000
if (hasPurged) {
10011001
if (++stats.warmOOM == 1) {
1002-
EP_LOG_WARN_RAW(
1002+
EP_LOG_WARN(
1003+
"LoadStorageKVPairCallback::callback(): {} "
10031004
"Warmup dataload failure: max_size too "
1004-
"low.");
1005+
"low.",
1006+
vb->getId());
10051007
}
10061008
} else {
1007-
EP_LOG_WARN_RAW(
1009+
EP_LOG_WARN(
1010+
"LoadStorageKVPairCallback::callback(): {} "
10081011
"Emergency startup purge to free space for "
1009-
"load.");
1012+
"load.",
1013+
vb->getId());
10101014
purge();
10111015
}
10121016
} else {
1013-
EP_LOG_WARN_RAW(
1014-
"Cannot store an item after emergency purge.");
1017+
EP_LOG_WARN(
1018+
"LoadStorageKVPairCallback::callback(): {} "
1019+
"Cannot store an item after emergency purge.",
1020+
vb->getId());
10151021
++stats.warmOOM;
10161022
}
10171023
break;
10181024
case MutationStatus::InvalidCas:
10191025
EP_LOG_DEBUG(
1026+
"LoadStorageKVPairCallback::callback(): {} "
10201027
"Value changed in memory before restore from disk. "
10211028
"Ignored disk value for: key{{{}}}.",
1029+
vb->getId(),
10221030
i->getKey().c_str());
10231031
++stats.warmDups;
10241032
succeeded = true;
@@ -1070,9 +1078,11 @@ void LoadStorageKVPairCallback::callback(GetValue& val) {
10701078
epstore.warmupCompleted();
10711079
logWarmupStats(epstore);
10721080
}
1073-
EP_LOG_INFO_RAW(
1081+
EP_LOG_INFO(
1082+
"LoadStorageKVPairCallback::callback(): {} "
10741083
"Engine warmup is complete, request to stop "
1075-
"loading remaining database");
1084+
"loading remaining database",
1085+
i->getVBucketId());
10761086
setStatus(cb::engine_errc::no_memory);
10771087
} else {
10781088
setStatus(cb::engine_errc::success);

0 commit comments

Comments
 (0)