Use LZ4 compression as fallback
This commit is contained in:
parent
563defb2ff
commit
8c2f3b89b6
@ -217,18 +217,23 @@ public class LLLocalKeyValueDatabase implements LLKeyValueDatabase {
|
||||
if (isDisableAutoCompactions()) {
|
||||
columnFamilyOptions.setDisableAutoCompactions(true);
|
||||
}
|
||||
columnFamilyOptions.setEnableBlobFiles(columnOptions.blobFiles());
|
||||
if (columnOptions.blobFileSize().isPresent()) {
|
||||
columnFamilyOptions.setBlobFileSize(columnOptions.blobFileSize().get());
|
||||
var blobFiles = columnOptions.blobFiles();
|
||||
columnFamilyOptions.setEnableBlobFiles(blobFiles);
|
||||
if (blobFiles) {
|
||||
if (columnOptions.blobFileSize().isPresent()) {
|
||||
columnFamilyOptions.setBlobFileSize(columnOptions.blobFileSize().get());
|
||||
}
|
||||
if (columnOptions.minBlobSize().isPresent()) {
|
||||
columnFamilyOptions.setMinBlobSize(columnOptions.minBlobSize().get());
|
||||
}
|
||||
if (columnOptions.blobCompressionType().isPresent()) {
|
||||
columnFamilyOptions.setCompressionType(columnOptions.blobCompressionType().get().getType());
|
||||
} else {
|
||||
columnFamilyOptions.setCompressionType(CompressionType.LZ4_COMPRESSION);
|
||||
}
|
||||
columnFamilyOptions.setBlobCompactionReadaheadSize(4 * SizeUnit.MB);
|
||||
columnFamilyOptions.setEnableBlobGarbageCollection(true);
|
||||
}
|
||||
if (columnOptions.minBlobSize().isPresent()) {
|
||||
columnFamilyOptions.setMinBlobSize(columnOptions.minBlobSize().get());
|
||||
}
|
||||
if (columnOptions.blobCompressionType().isPresent()) {
|
||||
columnFamilyOptions.setCompressionType(columnOptions.blobCompressionType().get().getType());
|
||||
}
|
||||
columnFamilyOptions.setBlobCompactionReadaheadSize(4 * SizeUnit.MB);
|
||||
columnFamilyOptions.setEnableBlobGarbageCollection(true);
|
||||
|
||||
// This option is not supported with multiple db paths
|
||||
// https://www.arangodb.com/docs/stable/programs-arangod-rocksdb.html
|
||||
|
Loading…
Reference in New Issue
Block a user