You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-05 15:41:14 +03:00
Suppressed logging self-correcting problems.
It will start logging as an err if it does not self-correct after 10 attempts, and will escalate to crit after 20 attempts. Also fixed a silly error where it was checking the file size after it deleted the file.
This commit is contained in:
@ -409,6 +409,7 @@ void Synchronizer::process(list<string>::iterator name)
|
|||||||
s.unlock();
|
s.unlock();
|
||||||
|
|
||||||
bool success = false;
|
bool success = false;
|
||||||
|
int retryCount = 0;
|
||||||
while (!success)
|
while (!success)
|
||||||
{
|
{
|
||||||
assert(!s.owns_lock());
|
assert(!s.owns_lock());
|
||||||
@ -434,8 +435,11 @@ void Synchronizer::process(list<string>::iterator name)
|
|||||||
success = true;
|
success = true;
|
||||||
}
|
}
|
||||||
catch(exception &e) {
|
catch(exception &e) {
|
||||||
logger->log(LOG_CRIT, "Synchronizer::process(): error sync'ing %s opFlags=%d, got '%s'. Retrying...", key.c_str(),
|
// these are often self-resolving, so we will suppress logging it for 10 iterations, then escalate
|
||||||
pending->opFlags, e.what());
|
// to error, then to crit
|
||||||
|
if (++retryCount >= 10)
|
||||||
|
logger->log((retryCount < 20 ? LOG_ERR : LOG_CRIT), "Synchronizer::process(): error sync'ing %s opFlags=%d, got '%s'. Retrying...", key.c_str(),
|
||||||
|
pending->opFlags, e.what());
|
||||||
success = false;
|
success = false;
|
||||||
sleep(1);
|
sleep(1);
|
||||||
continue;
|
continue;
|
||||||
@ -706,7 +710,7 @@ void Synchronizer::synchronizeWithJournal(const string &sourceFile, list<string>
|
|||||||
ostringstream oss;
|
ostringstream oss;
|
||||||
oss << "Synchronizer::synchronizeWithJournal(): detected a mismatch between file size and " <<
|
oss << "Synchronizer::synchronizeWithJournal(): detected a mismatch between file size and " <<
|
||||||
"length stored in the object name. object name = " << cloudKey << " length-in-name = " <<
|
"length stored in the object name. object name = " << cloudKey << " length-in-name = " <<
|
||||||
MetadataFile::getLengthFromKey(cloudKey) << " real-length = " << bf::file_size(oldCachePath);
|
MetadataFile::getLengthFromKey(cloudKey) << " real-length = " << oldSize;
|
||||||
logger->log(LOG_WARNING, oss.str().c_str());
|
logger->log(LOG_WARNING, oss.str().c_str());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user