Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Framework/src/AggregatorRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ void AggregatorRunner::start(ServiceRegistryRef services)
}

// register ourselves to the BK
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
ILOG(Debug, Devel) << "Registering aggregator to BookKeeping" << ENDM;
try {
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, AggregatorRunner::getDetectorName(mAggregators), bkp::DplProcessType::QC_AGGREGATOR, "");
Expand Down
2 changes: 1 addition & 1 deletion Framework/src/CheckRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ void CheckRunner::start(ServiceRegistryRef services)
}

// register ourselves to the BK
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
ILOG(Debug, Devel) << "Registering checkRunner to BookKeeping" << ENDM;
try {
Bookkeeping::getInstance().registerProcess(mActivity->mId, mDeviceName, mDetectorName, bkp::DplProcessType::QC_CHECKER, "");
Expand Down
2 changes: 1 addition & 1 deletion Framework/src/PostProcessingRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void PostProcessingRunner::start(framework::ServiceRegistryRef dplServices)
QcInfoLogger::setRun(mActivity.mId);

// register ourselves to the BK
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK")) { // until we are sure it works, we have to turn it on
if (!gSystem->Getenv("O2_QC_DONT_REGISTER_IN_BK")) { // Set this variable to disable the registration
ILOG(Debug, Devel) << "Registering pp task to BookKeeping" << ENDM;
try {
Bookkeeping::getInstance().registerProcess(mActivity.mId, mRunnerConfig.taskName, mRunnerConfig.detectorName, bkp::DplProcessType::QC_POSTPROCESSING, "");
Expand Down
15 changes: 1 addition & 14 deletions Framework/src/TaskRunner.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,6 @@ void TaskRunner::start(ServiceRegistryRef services)
mNoMoreCycles = false;
mCycleNumber = 0;

if (gSystem->Getenv("O2_QC_REGISTER_IN_BK_AT_START")) {
// until we are sure it works, we have to turn it on
registerToBookkeeping();
}

try {
startOfActivity();
startCycle();
Expand Down Expand Up @@ -442,13 +437,6 @@ void TaskRunner::registerToBookkeeping()
ILOG(Debug, Devel) << "Registering taskRunner to BookKeeping" << ENDM;
try {
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bkp::DplProcessType::QC_TASK, "");
if (gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES")) {
ILOG(Debug, Devel) << "O2_QC_REGISTER_IN_BK_X_TIMES set to " << gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES") << ENDM;
int iterations = std::stoi(gSystem->Getenv("O2_QC_REGISTER_IN_BK_X_TIMES"));
for (int i = 1; i < iterations; i++) { // start at 1 because we already did it once
Bookkeeping::getInstance().registerProcess(mActivity.mId, mTaskConfig.taskName, mTaskConfig.detectorName, bkp::DplProcessType::QC_TASK, "");
}
}
} catch (std::runtime_error& error) {
ILOG(Warning, Devel) << "Failed registration to the BookKeeping: " << error.what() << ENDM;
}
Expand All @@ -465,8 +453,7 @@ void TaskRunner::finishCycle(DataAllocator& outputs)
<< "(" << mTimekeeper->getTimerangeIdRange().getMin() << ", " << mTimekeeper->getTimerangeIdRange().getMax() << ")" << ENDM;
mTask->endOfCycle();

if (mCycleNumber == 0 && gSystem->Getenv("O2_QC_REGISTER_IN_BK")) {
// until we are sure it works, we have to turn it on
if (mCycleNumber == 0) { // register at the end of the first cycle
registerToBookkeeping();
}

Expand Down
5 changes: 5 additions & 0 deletions doc/Framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,11 @@ Null QOs are marked with purple.

![](images/qo_flag_conversion_10.svg)

## Registration of QC devices into the BookKeeping

By default, the QC tasks, PP tasks, check runners, and aggregators are registered in the BK.
To disable this behaviour, pass the following environment variable : `O2_QC_DONT_REGISTER_IN_BK` (in the ECS).

## Solving performance issues

Problems with performance in message passing systems like QC usually manifest in backpressure seen in input channels of processes which are too slow.
Expand Down