Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public RocksDBStdSessions(HugeConfig config, String dataPath,
List<ColumnFamilyDescriptor> cfds = new ArrayList<>(cfs.size());
for (String cf : cfs) {
ColumnFamilyDescriptor cfd = new ColumnFamilyDescriptor(encode(cf));
ColumnFamilyOptions options = cfd.columnFamilyOptions();
ColumnFamilyOptions options = cfd.getOptions();
RocksDBStdSessions.initOptions(this.conf, null, options, options);
cfds.add(cfd);
}
Expand Down Expand Up @@ -156,7 +156,7 @@ public void createTable(String table) throws RocksDBException {

// Should we use options.setCreateMissingColumnFamilies() to create CF
ColumnFamilyDescriptor cfd = new ColumnFamilyDescriptor(encode(table));
ColumnFamilyOptions options = cfd.columnFamilyOptions();
ColumnFamilyOptions options = cfd.getOptions();
initOptions(this.conf, null, options, options);
this.cfs.put(table, this.rocksdb.createColumnFamily(cfd));

Expand Down Expand Up @@ -263,6 +263,7 @@ public static Set<String> listCFs(String path) throws RocksDBException {
return cfs;
}

@SuppressWarnings("deprecation") // setMaxBackgroundFlushes
public static void initOptions(HugeConfig conf,
DBOptionsInterface<?> db,
ColumnFamilyOptionsInterface<?> cf,
Expand All @@ -284,6 +285,10 @@ public static void initOptions(HugeConfig conf,
db.setInfoLogLevel(InfoLogLevel.valueOf(
conf.get(RocksDBOptions.LOG_LEVEL) + "_LEVEL"));

/*
* TODO: migrate to max_background_jobs option
* https://github.com/facebook/rocksdb/pull/2205/files
*/
db.setMaxBackgroundCompactions(
conf.get(RocksDBOptions.MAX_BG_COMPACTIONS));
db.setMaxSubcompactions(
Expand Down