adoroszlai commented on code in PR #4459:
URL: https://github.com/apache/ozone/pull/4459#discussion_r1150292007
##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/spi/impl/OzoneManagerServiceProviderImpl.java:
##########
@@ -469,6 +476,7 @@ void innerGetAndApplyDeltaUpdatesFromOM(long
fromSequenceNumber,
LOG.info("Number of updates received from OM : {}, " +
"SequenceNumber diff: {}, SequenceNumber Lag from OM {}.",
numUpdates, getCurrentOMDBSequenceNumber() - fromSequenceNumber, lag);
+ return null != dbUpdates ? dbUpdates.isDBUpdateSuccess() : false;
Review Comment:
nit:
```suggestion
return null != dbUpdates && dbUpdates.isDBUpdateSuccess();
```
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/RDBStore.java:
##########
@@ -78,12 +79,34 @@ public class RDBStore implements DBStore {
*/
private final String dbCompactionLogDirName = "compaction-log";
+ // this is to track the total size of dbUpdates data since sequence
+ // number in request to avoid increase in heap memory.
+ private long maxDbUpdatesSizeThreshold;
+
@VisibleForTesting
public RDBStore(File dbFile, ManagedDBOptions options,
Set<TableConfig> families) throws IOException {
this(dbFile, options, new ManagedWriteOptions(), families,
new CodecRegistry(), false, 1000, null, false,
TimeUnit.DAYS.toMillis(1), TimeUnit.HOURS.toMillis(1));
+ this.maxDbUpdatesSizeThreshold = MAX_DB_UPDATES_SIZE_THRESHOLD;
+ }
+
+ @SuppressWarnings("checkstyle:ParameterNumber")
+ @VisibleForTesting
+ public RDBStore(File dbFile, ManagedDBOptions rocksDBOption,
+ ManagedWriteOptions writeOptions,
+ Set<TableConfig> tableConfigs, CodecRegistry registry,
+ boolean openReadOnly, int maxFSSnapshots,
+ String dbJmxBeanNameName, boolean enableCompactionLog,
+ long maxTimeAllowedForSnapshotInDag,
+ long pruneCompactionDagDaemonRunInterval,
+ long maxDbUpdatesSizeThreshold) throws IOException {
+ this(dbFile, rocksDBOption, writeOptions, tableConfigs, registry,
+ openReadOnly, maxFSSnapshots, dbJmxBeanNameName,
+ enableCompactionLog, maxTimeAllowedForSnapshotInDag,
+ pruneCompactionDagDaemonRunInterval);
+ this.maxDbUpdatesSizeThreshold = maxDbUpdatesSizeThreshold;
}
Review Comment:
Please add the new param to the existing constructor instead of creating a
new one.
--
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]