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

KAFKA-3761: Remove BrokerState "RunningAsController" #1437

Closed
wants to merge 5 commits into from

Conversation

theduderog
Copy link
Contributor

@theduderog theduderog commented May 27, 2016

The reasons to remove it are:

  1. It's currently broken. The purpose of the JIRA was to report that the RunningAsController state gets overwritten back to "RunningAsBroker".
  2. It's not a useful state.
    a. If clients want to use this metric to know whether a broker is ready to receive requests or not, they do not care whether or not the broker is the controller
    b. there is already a separate boolean property, KafkaController.isActive which contains this information.

EasyMock.expect(mockBrokerState.newState(RunningAsBroker)).andDelegateTo(brokerStateInterceptor).once()
EasyMock.expect(mockBrokerState.newState(RunningAsController)).andDelegateTo(brokerStateInterceptor).once()
EasyMock.expect(mockBrokerState.newState(BrokerShuttingDown)).once()
EasyMock.expect(mockBrokerState.newState(NotRunning)).once()
Copy link
Contributor

Choose a reason for hiding this comment

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

It may be a good idea to have a second broker that is not a controller and verify the behaviour for that too.

@theduderog
Copy link
Contributor Author

I spoke with @junrao and he agreed that removing it seemed best.

@ijuma
Copy link
Contributor

ijuma commented Jun 23, 2016

Can you please update the PR title and description? Note that the PR description becomes the comment in the merged commit, so it should focus on the change only.

The change LGTM, but let's wait for the outcome of the mailing list discussion you started @theduderog.

@theduderog theduderog changed the title KAFKA-3761: Controller has RunningAsBroker instead of RunningAsController state KAFKA-3761: Remove BrokerState "RunningAsController" Jun 23, 2016
@theduderog
Copy link
Contributor Author

retest this please

@ijuma
Copy link
Contributor

ijuma commented Jun 24, 2016

We also need a note in upgrade.html.

@theduderog
Copy link
Contributor Author

@ijuma I've add a note in the upgrade doc if you can take a look.

@@ -118,6 +118,12 @@
<li> The new consumer API has been marked stable. </li>
</ul>

<h5><a id="upgrade_101_notable" href="#upgrade_101_notable">Notable changes in 0.10.0.1</a></h5>
Copy link
Contributor

Choose a reason for hiding this comment

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

This change will be in 0.10.1.0, not 0.10.0.1 (the latter only includes bug fixes).

@theduderog
Copy link
Contributor Author

Updated upgrade doc based on @ijuma's feedback.

@ijuma
Copy link
Contributor

ijuma commented Jun 24, 2016

LGTM

@theduderog
Copy link
Contributor Author

Still failing on KStreams test: org.apache.kafka.streams.integration.KStreamRepartitionJoinTest > shouldCorrectlyRepartitionOnJoinOperations

@theduderog theduderog closed this Jun 28, 2016
@theduderog theduderog reopened this Jun 28, 2016
@granthenke
Copy link
Member

LGTM

@theduderog
Copy link
Contributor Author

This time it's failing on ssl producer test:

kafka.api.SslProducerSendTest > testCloseWithZeroTimeoutFromCallerThread FAILED java.lang.AssertionError: No request is complete.

@ijuma
Copy link
Contributor

ijuma commented Jun 29, 2016

No objections in the mailing list and 3 +1s (two from committers). Jun also agrees according to Roger's comment.

Tests passed locally, merged to trunk.

@asfgit asfgit closed this in cf03f34 Jun 29, 2016
@theduderog theduderog deleted the KAFKA-3761-broker-state branch June 29, 2016 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants