Skip to content
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

Remove unused code from ByteBufVisitor #4383

Merged
merged 1 commit into from
May 24, 2024

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented May 22, 2024

Motivation

ByteBufVisitor added in #4196 contains some code that isn't used and covered by unit tests.
It's better to remove such code since it makes it harder to reason about the solution. The ByteBufVisitor solution will unwrap all direct buffers that can be unwrapped without the code that is to be removed. I believe that I forgot this code from some earlier phase of the solution where it was necessary to include this.
I ran some local tests and didn't see that the code was used for the original purpose that it was added for (supporting read-only buffers).

Changes

Remove the unused code.

@lhotari lhotari marked this pull request as draft May 22, 2024 23:01
@lhotari
Copy link
Member Author

lhotari commented May 22, 2024

It seems that this might be needed. Will add a test case after checking

@lhotari
Copy link
Member Author

lhotari commented May 24, 2024

It's safe to remove the code. I guess I had added the code originally as a performance optimization, but it's not useful in the end. I'm marking this PR as ready to review. @shoothzj Please merge this and cherry-pick to branch-4.16 and branch-4.17.

@lhotari lhotari marked this pull request as ready for review May 24, 2024 08:42
@shoothzj shoothzj merged commit 84fd255 into apache:master May 24, 2024
21 checks passed
shoothzj pushed a commit that referenced this pull request May 25, 2024
### Motivation

ByteBufVisitor added in #4196 contains some code that isn't used and covered by unit tests.
It's better to remove such code since it makes it harder to reason about the solution. The ByteBufVisitor solution will unwrap all direct buffers that can be unwrapped without the code that is to be removed. I believe that I forgot this code from some earlier phase of the solution where it was necessary to include this.
I ran some local tests and didn't see that the code was used for the original purpose that it was added for (supporting read-only buffers).

### Changes

Remove the unused code.

(cherry picked from commit 84fd255)
shoothzj pushed a commit that referenced this pull request May 25, 2024
### Motivation

ByteBufVisitor added in #4196 contains some code that isn't used and covered by unit tests.
It's better to remove such code since it makes it harder to reason about the solution. The ByteBufVisitor solution will unwrap all direct buffers that can be unwrapped without the code that is to be removed. I believe that I forgot this code from some earlier phase of the solution where it was necessary to include this.
I ran some local tests and didn't see that the code was used for the original purpose that it was added for (supporting read-only buffers).

### Changes

Remove the unused code.

(cherry picked from commit 84fd255)
@hangc0276 hangc0276 added this to the 4.18.0 milestone May 26, 2024
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
### Motivation

ByteBufVisitor added in apache#4196 contains some code that isn't used and covered by unit tests. 
It's better to remove such code since it makes it harder to reason about the solution. The ByteBufVisitor solution will unwrap all direct buffers that can be unwrapped without the code that is to be removed. I believe that I forgot this code from some earlier phase of the solution where it was necessary to include this.
I ran some local tests and didn't see that the code was used for the original purpose that it was added for (supporting read-only buffers).

### Changes

Remove the unused code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants