Do not alert on error which can happen naturally in GC

This commit is contained in:
Francesco Mazzoli
2023-07-26 19:28:44 +00:00
parent 0fc80dfe0f
commit b0ff28dc44

View File

@@ -391,8 +391,15 @@ private:
}
void _handleShardError(ShardId shid, EggsError err) {
if (err == EggsError::NAME_NOT_FOUND) { // this is expected in a few cases
if (err == EggsError::NAME_NOT_FOUND) {
// these can happen through normal user interaction
LOG_DEBUG(_env, "got innocuous shard error %s from shard %s", err, shid);
} else if (err == EggsError::DIRECTORY_HAS_OWNER) {
// These can happen but should be rare.
//
// DIRECTORY_HAS_OWNER can happen in gc (we clean it up and then remove
// it, but somebody else might have created stuff in it in the meantime)
LOG_INFO(_env, "got innocuous shard error %s from shard %s", err, shid);
} else {
RAISE_ALERT(_env, "got shard error %s from shard %s", err, shid);
}