muralibasani commented on code in PR #24132:
URL: https://github.com/apache/kafka/pull/24132#discussion_r4530092291
##########
storage/src/main/java/org/apache/kafka/storage/internals/log/LogConfig.java:
##########
@@ -422,38 +403,38 @@ public boolean errorsDeadletterqueueGroupEnable() {
}
public boolean remoteStorageEnable() {
- return remoteLogConfig.remoteStorageEnable;
+ return remoteLogConfig.remoteStorageEnable();
}
public Boolean remoteLogDeleteOnDisable() {
- return remoteLogConfig.remoteLogDeleteOnDisable;
+ return remoteLogConfig.remoteLogDeleteOnDisable();
}
public Boolean remoteLogCopyDisable() {
- return remoteLogConfig.remoteLogCopyDisable;
+ return remoteLogConfig.remoteLogCopyDisable();
}
public long remoteCopyLagMs() {
- return remoteLogConfig.remoteCopyLagMs ==
RemoteLogManagerConfig.MAX_LOG_REMOTE_COPY_LAG_MS ? localRetentionMs() :
remoteLogConfig.remoteCopyLagMs;
+ return remoteLogConfig.remoteCopyLagMs() ==
RemoteLogManagerConfig.MAX_LOG_REMOTE_COPY_LAG_MS ? localRetentionMs() :
remoteLogConfig.remoteCopyLagMs();
}
public long remoteCopyLagBytes() {
- return remoteLogConfig.remoteCopyLagBytes ==
RemoteLogManagerConfig.MAX_LOG_REMOTE_COPY_LAG_BYTES ? localRetentionBytes() :
remoteLogConfig.remoteCopyLagBytes;
+ return remoteLogConfig.remoteCopyLagBytes() ==
RemoteLogManagerConfig.MAX_LOG_REMOTE_COPY_LAG_BYTES ? localRetentionBytes() :
remoteLogConfig.remoteCopyLagBytes();
}
public long localRetentionMs() {
- return remoteLogConfig.localRetentionMs ==
LogConfig.DEFAULT_LOCAL_RETENTION_MS ? retentionMs :
remoteLogConfig.localRetentionMs;
+ return remoteLogConfig.localRetentionMs() ==
LogConfig.DEFAULT_LOCAL_RETENTION_MS ? retentionMs :
remoteLogConfig.localRetentionMs();
}
public long localRetentionBytes() {
- return remoteLogConfig.localRetentionBytes ==
LogConfig.DEFAULT_LOCAL_RETENTION_BYTES ? retentionSize :
remoteLogConfig.localRetentionBytes;
+ return remoteLogConfig.localRetentionBytes() ==
LogConfig.DEFAULT_LOCAL_RETENTION_BYTES ? retentionSize :
remoteLogConfig.localRetentionBytes();
}
public String overriddenConfigsAsLoggableString() {
Map<String, Object> overriddenTopicProps = new HashMap<>();
- props.forEach((k, v) -> {
+ originals().forEach((k, v) -> {
Review Comment:
(nit) Looping over the few overridden keys avoids the copy ?
```
Map<String, Object> originals = originals();
overriddenConfigs.forEach(k -> { if (originals.containsKey(k))
overriddenTopicProps.put(k, originals.get(k)); });
```
--
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]