-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.go
More file actions
75 lines (72 loc) · 3.13 KB
/
Copy patherrors.go
File metadata and controls
75 lines (72 loc) · 3.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package wal
import "errors"
var (
// ErrClosed reports use after a terminal storage state.
ErrClosed = errors.New(
"wal: closed; open or create another WAL instance before continuing",
)
// ErrCapacity reports a configured byte or item limit.
ErrCapacity = errors.New(
"wal: capacity exceeded; truncate, compact, or provision more configured capacity",
)
// ErrTooLarge reports one value larger than its configured maximum.
ErrTooLarge = errors.New(
"wal: item too large; reduce it or raise the relevant configured limit",
)
// ErrCorrupt reports invalid durable storage content.
ErrCorrupt = errors.New(
"wal: corrupt; preserve the WAL and inspect it offline before reopening",
)
// ErrUnsupportedDurability reports a persistence level an implementation
// cannot provide. Implementations must never silently downgrade.
ErrUnsupportedDurability = errors.New(
"wal: unsupported durability; choose a supported level or implementation",
)
// ErrUnsupportedFormat reports a durable format version this build cannot
// interpret without guessing or mutation.
ErrUnsupportedFormat = errors.New(
"wal: unsupported format; use a compatible build or migrate the WAL offline",
)
// ErrBusy reports an exclusively owned filesystem directory.
ErrBusy = errors.New(
"wal: busy; retry after the current directory owner closes the WAL",
)
// ErrCapability reports a required filesystem primitive that is unavailable
// or cannot satisfy its documented contract.
ErrCapability = errors.New(
"wal: filesystem capability unavailable; use a supported filesystem or relax only the explicit policy",
)
// ErrBackpressure reports a bounded queue or concurrent-operation limit.
// The operation was not admitted and may be retried with bounded backoff.
ErrBackpressure = errors.New(
"wal: backpressure; retry the unadmitted operation with bounded backoff",
)
// ErrUncertain reports an earlier unresolved mutation. Only its
// documented operation-specific exact retry may be admitted.
ErrUncertain = errors.New(
"wal: WAL mutation unresolved; perform its documented exact resolution or reopen",
)
// ErrSyncFailed reports a failed durability barrier. The filesystem WAL
// instance becomes terminal for mutation.
ErrSyncFailed = errors.New(
"wal: WAL synchronization failed; preserve or quarantine this WAL epoch and reopen healthy storage",
)
// ErrCompactionUnknown reports that a replacement state may be
// authoritative. Reopen before another mutation.
ErrCompactionUnknown = errors.New(
"wal: WAL compaction outcome unknown; reopen before further maintenance",
)
// ErrCompactionCleanup reports incomplete cleanup of an unselected
// replacement or of obsolete files after a committed compaction. Inspect
// CompactionReport.Committed to determine which side is authoritative,
// then reopen to finish cleanup or safely reuse an empty candidate.
ErrCompactionCleanup = errors.New(
"wal: WAL compaction cleanup incomplete; inspect the report and reopen to finish cleanup",
)
)
func internalError(reason string) error {
return errors.New(
"wal: internal invariant failed (" + reason +
"); stop using the instance and report the failure",
)
}