Skip to content

Commit

Permalink
move rocksdbStats to the end of closing
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Harris <[email protected]>
  • Loading branch information
rolfyone committed Jan 31, 2025
1 parent 067b6bd commit 9bf8f8a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,7 @@ public static KvStoreAccessor create(
final ColumnFamilyOptions columnFamilyOptions =
createColumnFamilyOptions(configuration, blockCache);
final List<AutoCloseable> resources =
new ArrayList<>(
List.of(txOptions, dbOptions, columnFamilyOptions, rocksDbStats, blockCache));
new ArrayList<>(List.of(txOptions, dbOptions, columnFamilyOptions, blockCache));

List<ColumnFamilyDescriptor> columnDescriptors =
createColumnFamilyDescriptors(columns, deletedColumns, columnFamilyOptions);
Expand Down Expand Up @@ -110,6 +109,7 @@ public static KvStoreAccessor create(
final ImmutableMap<KvStoreColumn<?, ?>, ColumnFamilyHandle> columnHandlesMap =
builder.build();
final ColumnFamilyHandle defaultHandle = getDefaultHandle(columnHandles);
resources.add(rocksDbStats);
resources.add(db);

rocksDbStats.registerMetrics(db);
Expand Down

0 comments on commit 9bf8f8a

Please sign in to comment.