Table of Contents

Class FileChecksumGenFactory

Namespace
RocksDbNet
Assembly
RocksDb.Net.dll

Produces the whole-file checksums RocksDb records for each SST file it writes. Maps to rocksdb_file_checksum_gen_factory_t.

public sealed class FileChecksumGenFactory : RocksDbHandle, IDisposable
Inheritance
FileChecksumGenFactory
Implements
Inherited Members

Remarks

Assign one to SetFileChecksumGenFactory(FileChecksumGenFactory) before opening the database. Without it RocksDb records no file checksums, and VerifyFileChecksums() fails rather than silently passing, because there is nothing to verify against.

Only files written while a factory was configured have a checksum, so enabling this on an existing database covers new files only.

Methods

CreateCrc32c()

Creates the built-in CRC32C checksum generator, the only one the C API exposes.

public static FileChecksumGenFactory CreateCrc32c()

Returns

FileChecksumGenFactory

DisposeHandle()

Releases the native handle. Called during disposal.

protected override void DisposeHandle()

Remarks

Protected rather than public: it destroys the native object without marking this instance disposed or clearing the handle, so calling it from outside and then disposing normally would free the same pointer twice. It was the most Dispose-looking member on the type. Callers want Dispose().