Commit b1c3768d authored by Eric Cano's avatar Eric Cano
Browse files

Fixed Info_tapeFilledUp tape log parameter potentially appearing with a count greater that 1.

parent f0f32b96
......@@ -256,7 +256,7 @@ void castor::tape::tapeserver::daemon::TapeWriteSingleThread::run() {
throw 0;
}
// This is indeed the end of the tape. Not an error.
m_watchdog.addToErrorCount("Info_tapeFilledUp");
m_watchdog.setErrorCount("Info_tapeFilledUp",1);
} catch (...) {
// The error is not an ENOSPC, so it is, indeed, an error.
// If we got here with a new error, currentErrorToCount will be non-empty,
......
......@@ -167,7 +167,7 @@ namespace daemon {
throw 0;
}
// This is indeed the end of the tape. Not an error.
watchdog.addToErrorCount("Info_tapeFilledUp");
watchdog.setErrorCount("Info_tapeFilledUp",1);
} catch (...) {
// The error is not an ENOSPC, so it is, indeed, an error.
// If we got here with a new error, currentErrorToCount will be non-empty,
......
......@@ -320,6 +320,19 @@ protected:
addParameter(log::Param(errorName, count));
}
/**
* Set error count. This is used for once per session events that could
* be detected several times.
*/
void setErrorCount (const std::string & errorName, uint32_t value) {
{
castor::server::MutexLocker locker(&m_mutex);
m_errorCounts[errorName] = value;
}
// We ship the new value ASAP to the main thread.
addParameter(log::Param(errorName, value));
}
/**
* Start the thread
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment