smengcl commented on code in PR #4884:
URL: https://github.com/apache/ozone/pull/4884#discussion_r1228841536
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataManagerImpl.java:
##########
@@ -525,22 +525,24 @@ public void start(OzoneConfiguration configuration)
throws IOException {
public static DBStore loadDB(OzoneConfiguration configuration, File metaDir)
throws IOException {
return loadDB(configuration, metaDir, OM_DB_NAME, false,
- java.util.Optional.empty(), true, true);
+ java.util.Optional.empty(), Optional.empty(), true, true);
}
public static DBStore loadDB(OzoneConfiguration configuration, File metaDir,
String dbName, boolean readOnly,
java.util.Optional<Boolean>
- disableAutoCompaction)
+ disableAutoCompaction,
+ java.util.Optional<Integer> maxOpenFiles)
Review Comment:
Not sure if `Optional` is preferred here while the parameter could be a
primitive `int`?
Also `-1` would be a valid input indicating not limited.
fyi I just realized RocksDB seem to have some usage restrictions when
`max_open_files` is not `-1`. Hopefully they don't impact our use case and are
unrelated:
1.
https://github.com/facebook/rocksdb/blob/cac3240cbfdb0bd4ef1900bc2d664187b3e404bb/db/db_impl/compacted_db_impl.cc#L235-L241
2.
https://github.com/facebook/rocksdb/blob/cac3240cbfdb0bd4ef1900bc2d664187b3e404bb/db/version_set.h#L1000-L1002
##########
hadoop-hdds/common/src/main/resources/ozone-default.xml:
##########
@@ -3894,6 +3894,18 @@
</description>
</property>
+ <property>
+ <name>ozone.om.snapshot.db.max.open.files</name>
+ <value>100</value>
+ <tag>OZONE, OM</tag>
+ <description>
+ Max number of open files for each snapshot db present in the snapshot
cache.
+ This will limit the total number of files opened by a snapshot db
thereby limiting the total number of
Review Comment:
```suggestion
Max number of open files for each snapshot db present in the snapshot
cache.
Essentially sets `max_open_files` config for RocksDB instances opened
for Ozone snapshots.
This will limit the total number of files opened by a snapshot db
thereby limiting the total number of
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]