Skip to content

Conversation

@belugabehr
Copy link
Contributor

No description provided.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

I am not sure that this code is better than before.
Which are the benefits ?
also I see that we are using a little more CPU cycles (more method calls)

}
if (zkServer.shouldThrottle(outstandingCount.incrementAndGet())) {
disableRecv(false);
if (zkServer.isPresent()
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure this is what we want,
previously we would have seen an NPE here,
now we aren't doing anything.

This is just an example,
can you please explain better the intent of the patch ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My intent was to remove the NPE. It is valid that zkServer could be null and yet there is no check for it (please review the original JIRA).

Is there something else that should be done here? Comments make it clear that zkServer has a valid value of null.

@belugabehr
Copy link
Contributor Author

@eolivelli
Copy link
Contributor

@belugabehr thanks for the pointer. I know about Optional benefits.
My point is that I don't find the new code much better than the code without the patch, also it looks contains more boilerplate than before.

Let me think more about it

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.

2 participants