ArchiveCopyOptions
Namespace: Meshmakers.Octo.Runtime.Contracts.StreamData
Tuning of a native archive copy. The defaults are the figures of the local trial in
concept-tenant-backup-native-archive-dump.md §12 (slices of about two million rows).
public record ArchiveCopyOptions : IEquatable<ArchiveCopyOptions>
Inheritance Object → ArchiveCopyOptions
Implements IEquatable<ArchiveCopyOptions>
Fields
DefaultCommandTimeout
public static TimeSpan DefaultCommandTimeout;
DefaultOptimizeTimeout
public static TimeSpan DefaultOptimizeTimeout;
DefaultTargetSliceRows
public static long DefaultTargetSliceRows;
DefaultMaxMapAttempts
public static int DefaultMaxMapAttempts;
Properties
TargetSliceRows
Rows a time slice aims at when the copy is planned (IStreamDataRepository.PlanArchiveCopyAsync(OctoObjectId, ArchiveCopyOptions, CancellationToken)).
public long TargetSliceRows { get; set; }
Property Value
CommandTimeout
Command timeout of one COPY statement. Copy statements run as maintenance statements with this
timeout of their own, not with the interactive query timeout.
public TimeSpan CommandTimeout { get; set; }
Property Value
OptimizeAfterLoad
Merge the segments of the loaded table after the last slice of a restore (the longest single step of a restore, 7 min 40 s for the 115 million row tenant on one node). Switch off to leave the merge to CrateDB.
public bool OptimizeAfterLoad { get; set; }
Property Value
MaxMapAttempts
How often a rollup may be copied again because its generation map moved while it was copied (IStreamDataRepository.DumpArchiveToStagingAsync(OctoObjectId, ArchiveCopyStagingLocation, ArchiveCopyOptions, CancellationToken)). The dump fails when the map moves in every attempt.
public int MaxMapAttempts { get; set; }
Property Value
RepeatOnMovedMap
When false a dump of a rollup copies it once, does not compare the generation map before and after, and returns
normally with Attempts = 1 even if a recompute moved the map meanwhile. Default true (the repeat rule).
For characterisation tests that show what the repeat rule prevents; not for production use.
public bool RepeatOnMovedMap { get; set; }
Property Value
PhaseObserver
Called by IStreamDataRepository.DumpArchiveToStagingAsync(OctoObjectId, ArchiveCopyStagingLocation, ArchiveCopyOptions, CancellationToken) at the phases of ArchiveCopyPhase and
awaited before the dump goes on; null = nothing. For tests and diagnostics (e.g. to run a recompute at an exact moment
of a dump); the arguments are the phase and the number of the attempt (from 1). Exceptions it throws end the dump.
public Func<ArchiveCopyPhase, int, CancellationToken, Task> PhaseObserver { get; set; }
Property Value
Func<ArchiveCopyPhase, Int32, CancellationToken, Task>
OptimizeTimeout
Command timeout of the segment merge.
public TimeSpan OptimizeTimeout { get; set; }
Property Value
OverwriteDuplicates
Load with overwrite_duplicates = true, so a slice that is loaded a second time after a failure
replaces its rows instead of adding them again.
public bool OverwriteDuplicates { get; set; }
Property Value
Constructors
ArchiveCopyOptions()
public ArchiveCopyOptions()
Methods
Validate()
public void Validate()
Exceptions
ArgumentOutOfRangeException
A value is not usable.