Skip to content

MINOR: Remove unused code from storage classes #19853

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

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from

Conversation

wernerdv
Copy link
Contributor

Remove unused code from storage classes.

@github-actions github-actions bot added triage PRs from the community storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature small Small PRs labels May 29, 2025
@wernerdv
Copy link
Contributor Author

@chia7712 PTAL

@@ -42,12 +42,6 @@ public void handleRemoteLogMetadata(RemoteLogMetadata remoteLogMetadata) {

protected abstract void handleRemotePartitionDeleteMetadata(RemotePartitionDeleteMetadata remotePartitionDeleteMetadata);

public void syncLogMetadataSnapshot(TopicIdPartition topicIdPartition,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kamalcph is it ok to remove it? I'm not sure why #15636 does not remove it

Copy link
Contributor

@kamalcph kamalcph Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KAFKA-16454 was filed to snapshot the __remote_log_metadata topic for faster restarts, so the syncLogMetadataSnapshot and RemoteLogSegmentMetadataSnapshot.java was not removed.

is it ok to remove it?

The unused syncLogMetadataSnapshot method can be removed.

@github-actions github-actions bot removed the triage PRs from the community label Jun 3, 2025
return config.getString(REMOTE_STORAGE_MANAGER_CONFIG_PREFIX_PROP);
}

public String remoteLogMetadataManagerPrefix() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not remove the "prefix" configs, they are used by the RemoteStorageManager and RemoteLogMetadataManger plugins.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Restored the prefix configs.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can add comments to avoid exceptional deletion down the line

Copy link
Member

@brandboat brandboat Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about adding @SuppressWarnings("unused") to those unused methods or variables if we know they’re meant to be used elsewhere (or in the future)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea.
Added @SuppressWarnings("unused") and comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci-approved small Small PRs storage Pull requests that target the storage module tiered-storage Related to the Tiered Storage feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants