New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KAFKA-15037: pass remoteLogEnabled to unifiedLog #13779
Conversation
@@ -159,7 +159,7 @@ public void run() { | |||
while (!closing) { | |||
maybeWaitForPartitionsAssignment(); | |||
|
|||
log.info("Polling consumer to receive remote log metadata topic records"); | |||
log.trace("Polling consumer to receive remote log metadata topic records"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logging this line on each consumer poll will flood the log. Change to trace level
@satishd , please take a look. Thanks. |
For point 2, I think @satishd has some refactoring in mind to add more logic to UnifiedLog as per #13561 (comment)
Perhaps, we can perform all the refactoring in one go together later on prior to 3.6 release. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @showuon for the PR, left a minor comment.
These two minor changes were missed porting from 2.8.x branch. It is good to have them in the trunk.
@@ -1398,7 +1402,8 @@ object LogManager { | |||
logDirFailureChannel = logDirFailureChannel, | |||
time = time, | |||
keepPartitionMetadataFile = keepPartitionMetadataFile, | |||
interBrokerProtocolVersion = config.interBrokerProtocolVersion) | |||
interBrokerProtocolVersion = config.interBrokerProtocolVersion, | |||
remoteStorageSystemEnable = config.getBoolean(RemoteLogManagerConfig.REMOTE_LOG_STORAGE_SYSTEM_ENABLE_PROP)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use config.remoteLogManagerConfig.enableRemoteStorageSystem()
instead of checking the specific property in config as it is already built.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it's better to use onfig.remoteLogManagerConfig.enableRemoteStorageSystem()
. Updated.
+1 to have (2) for now. It does not need to wait for other refactorings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@showuon There are test failures in UnifiedLogTest.testFetchOffsetByTimestampFromRemoteStorage
as remoteLogManager
is not passed as an argument.
Sorry, I should have checked the build status. Fixed now. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @showuon for addressing the review comments. LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Failed tests are unrelated (with one infra's issue):
In previous build (I've rebuilt it), the failed tests are:
|
UnifiedLog relied on the
remoteStorageSystemEnable
to identify if the broker is enabling remote storage, but we never pass this value from the config into UnifiedLog. So it'll always be false.In this PR, I did:
remoteStorageSystemEnable
toUnifiedLog
remoteLogManager
from the class member ofUnifiedLog
since onlyUnifiedLog#fetchOffsetByTimestamp
needsremoteLogManager
, and this can be passed when called fromReplicaManager
.Committer Checklist (excluded from commit message)