I set CheckpointSettings.RemoveOutdated, LogDevice.recoverDevice, ObjectLogDevice.recoverDevice and FasterKV.tryRecoverLatest all to false. Than i recover a checkpoint that is a snapshot. Now how do i get FasterDb to stop deleting the recovered checkpoint snapshot or overwriting it? Also everytime i create a snapshot the old checkpoints get deleted as well. How do i fix this?
_logSettings = new LogSettings()
{
LogDevice = new ManagedLocalStorageDevice(Path.Combine(storePath, "LOG"), recoverDevice: false, osReadBuffering: true),
ObjectLogDevice = new ManagedLocalStorageDevice(Path.Combine(storePath, "DATA"), recoverDevice: false, osReadBuffering: true),
PageSizeBits = 9,
MemorySizeBits = 21,
SegmentSizeBits = 21,
MutableFraction = 0.1,
ReadCopyOptions = new ReadCopyOptions(ReadCopyFrom.AllImmutable, ReadCopyTo.MainLog),
ReadCacheSettings = new ReadCacheSettings()
{
PageSizeBits = 21,
MemorySizeBits = 30,
},
};
_checkpointSettings = new CheckpointSettings()
{
CheckpointManager = new DeviceLogCommitCheckpointManager(
new LocalStorageNamedDeviceFactory(),
new ConstructCheckpointNamingScheme(storePath)),
RemoveOutdated = false,
};
Store = new(
1L << 20,
_logSettings,
_checkpointSettings,
serializerSettings: new SerializerSettings<byte[], byte[]>()
{
keySerializer = () => new ByteArrayBinaryObjectSerializer(),
valueSerializer = () => new ByteArrayBinaryObjectSerializer(),
},
comparer: new ByteArrayFasterEqualityComparer(),
tryRecoverLatest: false);
SessionPool = new AsyncPool<ClientSession<byte[], byte[], byte[], byte[], Empty, ByteArrayFunctions>>(
_logSettings.LogDevice.ThrottleLimit,
() => Store.For(new ByteArrayFunctions()).NewSession<ByteArrayFunctions>());
I set
CheckpointSettings.RemoveOutdated
,LogDevice.recoverDevice
,ObjectLogDevice.recoverDevice
andFasterKV.tryRecoverLatest
all tofalse
. Than i recover a checkpoint that is a snapshot. Now how do i getFasterDb
to stop deleting the recovered checkpoint snapshot or overwriting it? Also everytime i create a snapshot the old checkpoints get deleted as well. How do i fix this?