Skip to content

KAFKA-12368: Added inmemory implementations for RemoteStorageManager and RemoteLogMetadataManager.#10218

Merged
junrao merged 9 commits intoapache:trunkfrom
satishd:KAFKA-12368
Apr 13, 2021
Merged

KAFKA-12368: Added inmemory implementations for RemoteStorageManager and RemoteLogMetadataManager.#10218
junrao merged 9 commits intoapache:trunkfrom
satishd:KAFKA-12368

Conversation

@satishd
Copy link
Copy Markdown
Member

@satishd satishd commented Feb 26, 2021

KAFKA-12368: Added inmemory implementations for RemoteStorageManager and RemoteLogMetadataManager.

  • Added inmemory implementation for RemoteStorageManager and RemoteLogMetadataManager. A major part of inmemory RLMM will be used in the default RLMM implementation which will be based on topic storage. These will be used in unit tests for tiered storage.
  • Added tests for both the implementations and their supported classes.

This is part of tiered storage implementation, KIP-405.

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@satishd satishd marked this pull request as draft March 1, 2021 15:31
@satishd satishd force-pushed the KAFKA-12368 branch 7 times, most recently from df6b7b3 to 2f0c2f1 Compare March 4, 2021 14:26
@satishd satishd marked this pull request as ready for review March 4, 2021 14:26
@satishd satishd force-pushed the KAFKA-12368 branch 2 times, most recently from 74f273b to a03cb96 Compare March 5, 2021 11:57
Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the PR. A couple of quick comments.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the PR. A few more comments below.

Copy link
Copy Markdown
Contributor

@kowshik kowshik left a comment

Choose a reason for hiding this comment

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

@satishd Thanks for the PR! Few comments below.

@satishd satishd force-pushed the KAFKA-12368 branch 3 times, most recently from b61336f to 0ce29f8 Compare March 12, 2021 04:55
@satishd
Copy link
Copy Markdown
Member Author

satishd commented Mar 12, 2021

thanks @junrao @kowshik for the review comments, addressed with the latest commits/comments.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the updated PR. A few more comments below.

Copy link
Copy Markdown
Contributor

@kowshik kowshik left a comment

Choose a reason for hiding this comment

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

@satishd Thanks for the updated PR! Few more comments below.

Copy link
Copy Markdown
Contributor

@kowshik kowshik left a comment

Choose a reason for hiding this comment

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

@satishd Thanks for the updates! Few more comments below, this time I made a pass on some of the test code as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hmm, do we need to explicitly check if endPosition < segment.length?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It takes Math.min(endPosition, segment.length). So, no need to have that check.

@satishd
Copy link
Copy Markdown
Member Author

satishd commented Mar 25, 2021

@kowshik I discussed the proposed changes in the call on 23rd, and I mentioned that PR is not updated with those changes. I will let you know once those changes are pushed into this PR.

@satishd satishd force-pushed the KAFKA-12368 branch 2 times, most recently from dfa913c to 96d05f9 Compare April 2, 2021 15:11
@satishd
Copy link
Copy Markdown
Member Author

satishd commented Apr 2, 2021

@junrao @kowshik thanks for your review and comments. In the latest commit, addressed the review comments. I have also refactored the code with better abstractions.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the updated PR. A few more comments below.

@satishd
Copy link
Copy Markdown
Member Author

satishd commented Apr 6, 2021

Thanks @junrao for the review. Addressed them with the latest commit.

@satishd satishd force-pushed the KAFKA-12368 branch 2 times, most recently from 0711931 to 3f88549 Compare April 7, 2021 14:21
@satishd
Copy link
Copy Markdown
Member Author

satishd commented Apr 7, 2021

@junrao This PR is on top of #10489 . So, #10489 be merged before merging this PR.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the updated PR. A few more comments below.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's kind of weird that the segment with epoch 0 is already deleted and yet we still expect the highest offset for epoch 0 to be returned.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

highestLogOffset can contain the deleted segments. highestLogOffset means the highest offset up to which the segments have been copied. Pl take a look at the comment.

satishd added 5 commits April 8, 2021 07:52
…and RemoteLogMetadataManager.

Added inmemory implementation for RemoteStorageManager and RemoteLogMetadataManager. A major part of inmemory RLMM will be used in the default RLMM implementation which will be based on topic storage. These will be used in unit tests for tiered storage.
Added a few tests for both the implementations.

This is part of tiered storage implementation, KIP-405.
Updated java doc comments and addressed typos.
Refactoring for better modularization.
Addressed review comments.
@satishd
Copy link
Copy Markdown
Member Author

satishd commented Apr 8, 2021

@junrao Thanks for your comments. Replied on comments and addressed them with the b5c0081 commit.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the updated PR. A few more comments.

Comment thread settings.gradle Outdated
Copy link
Copy Markdown
Contributor

@kowshik kowshik left a comment

Choose a reason for hiding this comment

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

@satishd Thanks for the updated PR! Few more comments.

Comment thread clients/src/test/java/org/apache/kafka/test/TestUtils.java
@satishd
Copy link
Copy Markdown
Member Author

satishd commented Apr 9, 2021

Thanks @junrao @kowshik for the comments. Addressed them with the d12c77a.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the updated PR. Just a minor comment below.

@satishd
Copy link
Copy Markdown
Member Author

satishd commented Apr 9, 2021

Thanks @junrao for the comment, addressed with the commit 317be7a.

Copy link
Copy Markdown
Contributor

@junrao junrao left a comment

Choose a reason for hiding this comment

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

@satishd : Thanks for the updated PR. LGTM. I will see if Kowshik has any further comments.

Copy link
Copy Markdown
Contributor

@kowshik kowshik left a comment

Choose a reason for hiding this comment

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

@satishd: Thanks for the updated PR. Just a minor comment below. Let us wait for CI to pass before merge.

* The below table summarizes whether the segment with the respective state are available for the given methods.
* <pre>
* +---------------------------------+----------------------+------------------------+-------------------------+-------------------------+
* | Method / SegmentState | COPY_SEGMENT_STARTED | COPY_SEGMENT_FINISHED | DELETE_SEGMENT_STARTED | DELETE_SEGMENT_STARTED |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo: The title of the last column should be DELETE_SEGMENT_FINISHED.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

thanks, addressed it in the latest commit.

@satishd
Copy link
Copy Markdown
Member Author

satishd commented Apr 12, 2021

@junrao @kowshik It looks like failures are not related to this PR.

@junrao junrao merged commit 3278090 into apache:trunk Apr 13, 2021
satishd added a commit to satishd/kafka that referenced this pull request May 31, 2021
…and RemoteLogMetadataManager. (apache#10218)

KAFKA-12368: Added inmemory implementations for RemoteStorageManager and RemoteLogMetadataManager.

Added inmemory implementation for RemoteStorageManager and RemoteLogMetadataManager. A major part of inmemory RLMM will be used in the default RLMM implementation which will be based on topic storage. These will be used in unit tests for tiered storage.
Added tests for both the implementations and their supported classes.
This is part of tiered storage implementation, KIP-405.

Reivewers:  Kowshik Prakasam <kprakasam@confluent.io>, Jun Rao <junrao@gmail.com>
kamalcph pushed a commit to satishd/kafka that referenced this pull request Jun 21, 2021
…and RemoteLogMetadataManager. (apache#10218)

KAFKA-12368: Added inmemory implementations for RemoteStorageManager and RemoteLogMetadataManager.

Added inmemory implementation for RemoteStorageManager and RemoteLogMetadataManager. A major part of inmemory RLMM will be used in the default RLMM implementation which will be based on topic storage. These will be used in unit tests for tiered storage.
Added tests for both the implementations and their supported classes.
This is part of tiered storage implementation, KIP-405.

Reivewers:  Kowshik Prakasam <kprakasam@confluent.io>, Jun Rao <junrao@gmail.com>
satishd added a commit to satishd/kafka that referenced this pull request Aug 12, 2021
…and RemoteLogMetadataManager. (apache#10218)

Summary:
KAFKA-12368: Added inmemory implementations for RemoteStorageManager and RemoteLogMetadataManager.

Added inmemory implementation for RemoteStorageManager and RemoteLogMetadataManager. A major part of inmemory RLMM will be used in the default RLMM implementation which will be based on topic storage. These will be used in unit tests for tiered storage.
Added tests for both the implementations and their supported classes.
This is part of tiered storage implementation, KIP-405.

apache-reviewers:  Kowshik Prakasam <kprakasam@confluent.io>, Jun Rao <junrao@gmail.com>
(cherry picked from commit 3278090)

Reviewers: #ldap_kafka_admins, kchandraprakash

Reviewed By: #ldap_kafka_admins, kchandraprakash

JIRA Issues: DKAFC-868

Differential Revision: https://code.uberinternal.com/D6303209
divijvaidya pushed a commit to Hangleton/kafka that referenced this pull request Apr 28, 2022
…and RemoteLogMetadataManager. (apache#10218)

Summary:
KAFKA-12368: Added inmemory implementations for RemoteStorageManager and RemoteLogMetadataManager.

Added inmemory implementation for RemoteStorageManager and RemoteLogMetadataManager. A major part of inmemory RLMM will be used in the default RLMM implementation which will be based on topic storage. These will be used in unit tests for tiered storage.
Added tests for both the implementations and their supported classes.
This is part of tiered storage implementation, KIP-405.

apache-reviewers:  Kowshik Prakasam <kprakasam@confluent.io>, Jun Rao <junrao@gmail.com>
(cherry picked from commit 3278090)

Reviewers: #ldap_kafka_admins, kchandraprakash

Reviewed By: #ldap_kafka_admins, kchandraprakash

JIRA Issues: DKAFC-868

Differential Revision: https://code.uberinternal.com/D6303209
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants