Documentation
¶
Index ¶
- Constants
- Variables
- func DirtySegments(dbDir string) ([]string, error)
- func IsSegmentName(name string) bool
- func RequireCleanForOfflineMaintenance(dbDir string) error
- func RequireCleanForReadOnlyOpen(dbDir string) error
- func ValidateClassRootDir(dir string) error
- func ValidateEncodedTransactionSize(n uint64) error
- func ValidateFramePayloadSize(n uint64) error
- func ValidateRelativePath(p string) error
- func ValidateV1RefClass(c RefClass) error
- type BackupMode
- type DurableAckCapability
- type MaintenanceBarrierSnapshot
- type ProtectedRef
- type ProtectionReason
- type RefClass
- type SideRefLifecycleState
Constants ¶
const ( KiB = 1024 MiB = 1024 * KiB GiB = 1024 * MiB )
const ( MaxEncodedTransactionBytes = 16 * MiB MaxOuterFramePayloadBytes = MaxEncodedTransactionBytes DefaultSegmentBytes = 64 * MiB MaxSegmentBytes = 1 * GiB MaxRootDeltasPerTransaction = 64 MaxMutatedRootsPerTransaction = 64 MaxInlineRootDeltaBytesPerTransaction = 4 * MiB MaxInlineRootDeltaBytesPerRoot = 1 * MiB MaxRootDeltaPayloadSideRefBytes = 64 * MiB MaxDecodedRootDeltaEntriesPerTxn = 262_144 MaxDeltaKeyBytes = 16 * KiB MaxDocumentIDBytes = MaxDeltaKeyBytes MaxInlineDeltaValueBytes = 1 * MiB MaxSideRefsPerTransaction = 16_384 MaxDescriptorOpsPerTransaction = 1_024 MaxLogicalNameBytes = 128 MaxRootNameBytes = 256 MaxRelativePathBytes = 512 MaxRelativePathComponents = 16 MaxRelativePathComponentBytes = 128 MaxResolvedAbsolutePathBytes = 4096 MaxVarintBytes = 10 MaxCompressedDecodedBytes = 64 * MiB DefaultRecoveryHeapBudgetBytes = 128 * MiB CollectionUIDBytes = 16 CRC32IEEEBytes = 4 )
Variables ¶
var ( ErrCollectionWALTerminalTail = errors.New("collectionwal: terminal incomplete tail") ErrCollectionWALCorruptMiddle = errors.New("collectionwal: corrupt middle") ErrCollectionWALBadChecksum = errors.New("collectionwal: bad checksum") ErrCollectionWALUnsupportedVersion = errors.New("collectionwal: unsupported version") ErrCollectionWALResourceLimit = errors.New("collectionwal: resource limit") ErrCollectionWALUnsafePath = errors.New("collectionwal: unsafe path") ErrCollectionWALMissingSideRef = errors.New("collectionwal: missing side ref") ErrCollectionWALIdentityMismatch = errors.New("collectionwal: identity mismatch") ErrCollectionWALSequenceGap = errors.New("collectionwal: sequence gap") ErrCollectionWALRedacted = errors.New("collectionwal: redacted") ErrCollectionWALRecoveryRequired = errors.New("collectionwal: recovery required") ErrCollectionWALUnsupportedMode = errors.New("collectionwal: unsupported mode") )
Functions ¶
func DirtySegments ¶
DirtySegments returns collection WAL segments in dbDir/wal. It intentionally does not consult cleanup metadata yet; until that reader exists, every collection WAL segment is treated as requiring read-write recovery.
func IsSegmentName ¶
IsSegmentName reports whether name is a canonical collection WAL segment name. The v1 cleanup scanner treats any such segment as dirty until the full segment classifier and cleanup-manifest reader are available.
func ValidateClassRootDir ¶
ValidateClassRootDir performs the portable subset of the collection WAL class root safety checks, including POSIX permission bits on platforms where those bits are authoritative. OS-specific openat/no-follow/owner/inode validation must run in the actual file opener before collection WAL can use a class root.
func ValidateRelativePath ¶
ValidateRelativePath validates advisory side-ref path metadata. A valid path is still not authority to open or delete a file; collection WAL cleanup must resolve the file through the trusted RefClass/FileID registry.
func ValidateV1RefClass ¶
Types ¶
type BackupMode ¶
type BackupMode uint8
const ( BackupModeCleanCheckpoint BackupMode = iota + 1 BackupModeWALSnapshot )
func (BackupMode) String ¶
func (m BackupMode) String() string
type DurableAckCapability ¶
type DurableAckCapability uint8
const ( DurableAckDisabled DurableAckCapability = iota DurableAckNoIndexRowInsertOnly )
func (DurableAckCapability) Enabled ¶
func (c DurableAckCapability) Enabled() bool
func (DurableAckCapability) String ¶
func (c DurableAckCapability) String() string
type MaintenanceBarrierSnapshot ¶
type MaintenanceBarrierSnapshot struct {
ProtectedRefs []ProtectedRef
UnclassifiedPrepares int
BackupPins int
RecoveryComplete bool
}
func (MaintenanceBarrierSnapshot) CanMutate ¶
func (s MaintenanceBarrierSnapshot) CanMutate() bool
type ProtectedRef ¶
type ProtectionReason ¶
type ProtectionReason uint8
const ( ProtectionPrepared ProtectionReason = iota + 1 ProtectionWALCommitted ProtectionPendingPublish ProtectionCollectionReadView ProtectionBackupManifest ProtectionCleanupPending )
func (ProtectionReason) String ¶
func (r ProtectionReason) String() string
type SideRefLifecycleState ¶
type SideRefLifecycleState uint8
const ( SideRefStateAbsent SideRefLifecycleState = iota SideRefStatePrepared SideRefStateWALCommitted SideRefStateMaterializedUnpublished SideRefStateApplied SideRefStateCleanable SideRefStateCleaned SideRefStateQuarantined )
func (SideRefLifecycleState) String ¶
func (s SideRefLifecycleState) String() string