AuditProblemKind Enumeration
Assembly: CodeEffects.Rule.Audit.dll
Namespace: CodeEffects.Rule.Audit
Summary
Specifies the kinds of AuditProblem that a recorder reports.
Syntax
public enum AuditProblemKind
{
// The journal reached JournalCapMegabytes
JournalFull = 1,
// The journal could not be written: the evaluation was not recorded
JournalFailed = 2,
// Records could not be moved into the database. They stay where they are and are tried again
DrainFailed = 3,
// Records were dropped: the version they name was deleted with its source object
RecordsDropped = 4,
// Something went wrong while an evaluation was recorded: that evaluation was not recorded
RecordFailed = 5,
// In Synchronous mode, the record could not be written to the database
StoreFailed = 6,
// Records held in memory were lost: the database could not take them in time as the recorder stopped
RecordsLost = 7,
// A journal file ends in bytes that are not a whole record. They were skipped
JournalDamaged = 8,
// The in-memory queue reached QueueCapacity
QueueFull = 9
}
The kind is the value of the Kind property of an AuditProblem, which the recorder passes to AuditSettings.OnProblem.
JournalFull and QueueFull mean that the database has been out of reach, or too slow, for long enough to fill the journal (JournalCapMegabytes) or the queue (QueueCapacity). Records are then dropped, or evaluations wait, as WhenFull says. Each is reported once, and again only after the journal falls back under 90 percent of its cap, or the queue under half of its capacity.
DrainFailed is reported on every failed attempt to move records into the database, including when the database is behind the schema that this version of the library needs (see AuditRecorder.CheckDatabase). The records are not lost: they stay in the journal or in memory and are tried again, after a delay that doubles up to MaxRetryDelaySeconds.
RecordsDropped means that the database discarded records because the rule version or source version they name no longer exists, since the source object was deleted. They are counted in AuditStatistics.Discarded.
RecordFailed and JournalFailed mean that one evaluation was not recorded; the evaluation itself was not affected. StoreFailed is the same for Synchronous mode, where, with ThrowOnStoreFailure, the evaluation also fails with an AuditException.
RecordsLost is reported as a recorder stops. JournalDamaged is reported when a process stopped while it was writing a journal file, or the disk damaged the file; the intact records around the damage are still moved.
The numeric values are permanent.