mirror of https://gitee.com/bigwinds/arangodb
more diagnostics
This commit is contained in:
parent
c912d96c3d
commit
fad7efe8c3
|
@ -109,7 +109,7 @@ void MMFilesDatafileStatistics::update(TRI_voc_fid_t fid,
|
|||
|
||||
if (it == _stats.end()) {
|
||||
LOG(WARN) << "did not find required statistics for datafile " << fid;
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND,
|
||||
"required datafile statistics not found");
|
||||
}
|
||||
|
||||
|
@ -127,7 +127,7 @@ void MMFilesDatafileStatistics::update(TRI_voc_fid_t fid, TRI_voc_fid_t src) {
|
|||
|
||||
if (it == _stats.end()) {
|
||||
LOG(WARN) << "did not find required statistics for datafile " << fid;
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND,
|
||||
"required datafile statistics not found");
|
||||
}
|
||||
|
||||
|
@ -137,7 +137,7 @@ void MMFilesDatafileStatistics::update(TRI_voc_fid_t fid, TRI_voc_fid_t src) {
|
|||
|
||||
if (it == _stats.end()) {
|
||||
LOG(WARN) << "did not find required statistics for source datafile " << src;
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND,
|
||||
"required datafile statistics not found");
|
||||
}
|
||||
|
||||
|
@ -154,7 +154,7 @@ void MMFilesDatafileStatistics::replace(TRI_voc_fid_t fid,
|
|||
|
||||
if (it == _stats.end()) {
|
||||
LOG(WARN) << "did not find required statistics for datafile " << fid;
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND,
|
||||
"required datafile statistics not found");
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ DatafileStatisticsContainer MMFilesDatafileStatistics::get(TRI_voc_fid_t fid) {
|
|||
|
||||
if (it == _stats.end()) {
|
||||
LOG(WARN) << "did not find required statistics for datafile " << fid;
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_INTERNAL,
|
||||
THROW_ARANGO_EXCEPTION_MESSAGE(TRI_ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND,
|
||||
"required datafile statistics not found");
|
||||
}
|
||||
|
||||
|
|
|
@ -463,6 +463,13 @@ int CollectorThread::processQueuedOperations(bool& worked) {
|
|||
res = processCollectionOperations((*it2));
|
||||
} catch (arangodb::basics::Exception const& ex) {
|
||||
res = ex.code();
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught exception while applying queued operations: " << ex.what();
|
||||
} catch (std::exception const& ex) {
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught exception while applying queued operations: " << ex.what();
|
||||
} catch (...) {
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught unknown exception while applying queued operations";
|
||||
}
|
||||
|
||||
if (res == TRI_ERROR_LOCK_TIMEOUT) {
|
||||
|
@ -672,8 +679,13 @@ int CollectorThread::processCollectionOperations(CollectorCache* cache) {
|
|||
res = TRI_ERROR_NO_ERROR;
|
||||
} catch (arangodb::basics::Exception const& ex) {
|
||||
res = ex.code();
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "wal collector caught exception: " << ex.what();
|
||||
} catch (std::exception const& ex) {
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "wal collector caught exception: " << ex.what();
|
||||
} catch (...) {
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "wal collector caught unknown exception";
|
||||
}
|
||||
|
||||
// always release the locks
|
||||
|
@ -789,8 +801,13 @@ int CollectorThread::collect(Logfile* logfile) {
|
|||
|
||||
} catch (arangodb::basics::Exception const& ex) {
|
||||
res = ex.code();
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught exception in collect: " << ex.what();
|
||||
} catch (std::exception const& ex) {
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught exception in collect: " << ex.what();
|
||||
} catch (...) {
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught unknown exception in collect";
|
||||
}
|
||||
|
||||
if (res != TRI_ERROR_NO_ERROR &&
|
||||
|
@ -860,8 +877,13 @@ int CollectorThread::transferMarkers(Logfile* logfile,
|
|||
}
|
||||
} catch (arangodb::basics::Exception const& ex) {
|
||||
res = ex.code();
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught exception in transferMarkers: " << ex.what();
|
||||
} catch (std::exception const& ex) {
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught exception in transferMarkers: " << ex.what();
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
} catch (...) {
|
||||
res = TRI_ERROR_INTERNAL;
|
||||
LOG_TOPIC(TRACE, Logger::COLLECTOR) << "caught unknown exception in transferMarkers";
|
||||
}
|
||||
|
||||
return res;
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
"ERROR_ARANGO_DATAFILE_UNREADABLE" : { "code" : 1006, "message" : "datafile unreadable" },
|
||||
"ERROR_ARANGO_DATAFILE_EMPTY" : { "code" : 1007, "message" : "datafile empty" },
|
||||
"ERROR_ARANGO_RECOVERY" : { "code" : 1008, "message" : "logfile recovery error" },
|
||||
"ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND" : { "code" : 1009, "message" : "datafile statistics not found" },
|
||||
"ERROR_ARANGO_CORRUPTED_DATAFILE" : { "code" : 1100, "message" : "corrupted datafile" },
|
||||
"ERROR_ARANGO_ILLEGAL_PARAMETER_FILE" : { "code" : 1101, "message" : "illegal or unreadable parameter file" },
|
||||
"ERROR_ARANGO_CORRUPTED_COLLECTION" : { "code" : 1102, "message" : "corrupted collection" },
|
||||
|
|
|
@ -63,6 +63,7 @@ ERROR_ARANGO_DUPLICATE_IDENTIFIER,1005,"duplicate identifier","Internal error th
|
|||
ERROR_ARANGO_DATAFILE_UNREADABLE,1006,"datafile unreadable","Internal error that will be raised when a datafile is unreadable."
|
||||
ERROR_ARANGO_DATAFILE_EMPTY,1007,"datafile empty","Internal error that will be raised when a datafile is empty."
|
||||
ERROR_ARANGO_RECOVERY,1008,"logfile recovery error","Will be raised when an error occurred during WAL log file recovery."
|
||||
ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND,1009,"datafile statistics not found","Will be raised when a required datafile statistics object was not found."
|
||||
|
||||
################################################################################
|
||||
## External ArangoDB storage errors
|
||||
|
|
|
@ -51,6 +51,7 @@ void TRI_InitializeErrorMessages () {
|
|||
REG_ERROR(ERROR_ARANGO_DATAFILE_UNREADABLE, "datafile unreadable");
|
||||
REG_ERROR(ERROR_ARANGO_DATAFILE_EMPTY, "datafile empty");
|
||||
REG_ERROR(ERROR_ARANGO_RECOVERY, "logfile recovery error");
|
||||
REG_ERROR(ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND, "datafile statistics not found");
|
||||
REG_ERROR(ERROR_ARANGO_CORRUPTED_DATAFILE, "corrupted datafile");
|
||||
REG_ERROR(ERROR_ARANGO_ILLEGAL_PARAMETER_FILE, "illegal or unreadable parameter file");
|
||||
REG_ERROR(ERROR_ARANGO_CORRUPTED_COLLECTION, "corrupted collection");
|
||||
|
|
|
@ -103,6 +103,8 @@
|
|||
/// Internal error that will be raised when a datafile is empty.
|
||||
/// - 1008: @LIT{logfile recovery error}
|
||||
/// Will be raised when an error occurred during WAL log file recovery.
|
||||
/// - 1009: @LIT{datafile statistics not found}
|
||||
/// Will be raised when a required datafile statistics object was not found.
|
||||
/// - 1100: @LIT{corrupted datafile}
|
||||
/// Will be raised when a corruption is detected in a datafile.
|
||||
/// - 1101: @LIT{illegal or unreadable parameter file}
|
||||
|
@ -1078,6 +1080,16 @@ void TRI_InitializeErrorMessages ();
|
|||
|
||||
#define TRI_ERROR_ARANGO_RECOVERY (1008)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief 1009: ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND
|
||||
///
|
||||
/// datafile statistics not found
|
||||
///
|
||||
/// Will be raised when a required datafile statistics object was not found.
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define TRI_ERROR_ARANGO_DATAFILE_STATISTICS_NOT_FOUND (1009)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
/// @brief 1100: ERROR_ARANGO_CORRUPTED_DATAFILE
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue