-
-
Notifications
You must be signed in to change notification settings - Fork 647
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
fix(models): Use the partition leader from partition info #1388
fix(models): Use the partition leader from partition info #1388
Conversation
@tchiotludo This should fix the first EH issue. I'm struggling to test it fully in my corporate environment, I'd have to publish the image to a private repo to really test it out. If you have the ability to publish a release-candidate labeled image then I could pretty easily test it. |
if (this.leader == null) | ||
{ | ||
org.apache.kafka.common.Node leader = partitionInfo.leader(); | ||
this.leader = new Node.Partition( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I null
check the leader
here?
* dev: (56 commits) chore(version): update to 0.24.0 chore(deps): update java deps fix(ui): fixing logo not showing on login form (tchiotludo#1449) fix(ui): fixing data download inconsistencies on JSON and CSV format (tchiotludo#1442) chore(docs): add GrtGaz as AKHQ user (tchiotludo#1439) feat(ui): download all messages in a topic to a csv file (tchiotludo#1384) fix(ui): clicking on Empty Topic button display blank screen (tchiotludo#1429) chore(landing): add baloise logo (tchiotludo#1427) fix(ui): don't disabled empty for compact,delete topic chore(deps): update all java deps fix(topicdata): Use the partition leader from partition info (tchiotludo#1388) fix(ui): harmonize utc labels (tchiotludo#1403) fix(ui): fix produce multi / tombstone not working and forms layout issue (tchiotludo#1396) fix(auth): fix regex header string for long strim (tchiotludo#1402) fix(webserver): reduce default micronaut log to warn (tchiotludo#1406) chore(webserver): warn if security group is wet without a jwt secret (tchiotludo#1412) chore(deps): update micronaut (tchiotludo#1405) feat(docs): list of available roles in documentation (tchiotludo#1394) chore(deps): update all java deps fix(ui): handle sche subject with special chars (tchiotludo#1354) ... # Conflicts: # build.gradle # gradle.properties # helm/akhq/Chart.yaml # src/test/java/org/akhq/controllers/KsqlDbControllerTest.java # src/test/java/org/akhq/repositories/KsqlDbRepositoryTest.java
* dev: (56 commits) chore(version): update to 0.24.0 chore(deps): update java deps fix(ui): fixing logo not showing on login form (tchiotludo#1449) fix(ui): fixing data download inconsistencies on JSON and CSV format (tchiotludo#1442) chore(docs): add GrtGaz as AKHQ user (tchiotludo#1439) feat(ui): download all messages in a topic to a csv file (tchiotludo#1384) fix(ui): clicking on Empty Topic button display blank screen (tchiotludo#1429) chore(landing): add baloise logo (tchiotludo#1427) fix(ui): don't disabled empty for compact,delete topic chore(deps): update all java deps fix(topicdata): Use the partition leader from partition info (tchiotludo#1388) fix(ui): harmonize utc labels (tchiotludo#1403) fix(ui): fix produce multi / tombstone not working and forms layout issue (tchiotludo#1396) fix(auth): fix regex header string for long strim (tchiotludo#1402) fix(webserver): reduce default micronaut log to warn (tchiotludo#1406) chore(webserver): warn if security group is wet without a jwt secret (tchiotludo#1412) chore(deps): update micronaut (tchiotludo#1405) feat(docs): list of available roles in documentation (tchiotludo#1394) chore(deps): update all java deps fix(ui): handle sche subject with special chars (tchiotludo#1354) ... # Conflicts: # build.gradle # docker-compose-dev.yml # docker-compose.yml # gradle.properties # helm/akhq/Chart.yaml # src/test/java/org/akhq/controllers/KsqlDbControllerTest.java # src/test/java/org/akhq/repositories/KsqlDbRepositoryTest.java
* dev: (56 commits) chore(version): update to 0.24.0 chore(deps): update java deps fix(ui): fixing logo not showing on login form (tchiotludo#1449) fix(ui): fixing data download inconsistencies on JSON and CSV format (tchiotludo#1442) chore(docs): add GrtGaz as AKHQ user (tchiotludo#1439) feat(ui): download all messages in a topic to a csv file (tchiotludo#1384) fix(ui): clicking on Empty Topic button display blank screen (tchiotludo#1429) chore(landing): add baloise logo (tchiotludo#1427) fix(ui): don't disabled empty for compact,delete topic chore(deps): update all java deps fix(topicdata): Use the partition leader from partition info (tchiotludo#1388) fix(ui): harmonize utc labels (tchiotludo#1403) fix(ui): fix produce multi / tombstone not working and forms layout issue (tchiotludo#1396) fix(auth): fix regex header string for long strim (tchiotludo#1402) fix(webserver): reduce default micronaut log to warn (tchiotludo#1406) chore(webserver): warn if security group is wet without a jwt secret (tchiotludo#1412) chore(deps): update micronaut (tchiotludo#1405) feat(docs): list of available roles in documentation (tchiotludo#1394) chore(deps): update all java deps fix(ui): handle sche subject with special chars (tchiotludo#1354) ... # Conflicts: # build.gradle # client/src/containers/Topic/Topic/Topic.jsx # client/src/containers/Topic/Topic/TopicData/TopicData.jsx # gradle.properties # helm/akhq/Chart.yaml # src/test/java/org/akhq/controllers/KsqlDbControllerTest.java # src/test/java/org/akhq/repositories/KsqlDbRepositoryTest.java
* dev: (62 commits) chore(docker): add unless-stopped (tchiotludo#1445) fix(connect): sort throw exception (tchiotludo#1431) chore(build): add idea-ext on build.gradle (tchiotludo#1446) fix(topicdata): no topic data when 1 record with newest sort (tchiotludo#1466) fix(topicdata): search can failed data pagination with many results (tchiotludo#1468) chore(schema): typos chore(version): update to 0.24.0 chore(deps): update java deps fix(ui): fixing logo not showing on login form (tchiotludo#1449) fix(ui): fixing data download inconsistencies on JSON and CSV format (tchiotludo#1442) chore(docs): add GrtGaz as AKHQ user (tchiotludo#1439) feat(ui): download all messages in a topic to a csv file (tchiotludo#1384) fix(ui): clicking on Empty Topic button display blank screen (tchiotludo#1429) chore(landing): add baloise logo (tchiotludo#1427) fix(ui): don't disabled empty for compact,delete topic chore(deps): update all java deps fix(topicdata): Use the partition leader from partition info (tchiotludo#1388) fix(ui): harmonize utc labels (tchiotludo#1403) fix(ui): fix produce multi / tombstone not working and forms layout issue (tchiotludo#1396) fix(auth): fix regex header string for long strim (tchiotludo#1402) ... # Conflicts: # .env # build.gradle # client/src/containers/Topic/Topic/TopicData/TopicData.jsx # gradle.properties # helm/akhq/Chart.yaml # src/main/java/org/akhq/controllers/SchemaController.java # src/test/java/org/akhq/controllers/KsqlDbControllerTest.java # src/test/java/org/akhq/repositories/KsqlDbRepositoryTest.java
This doesn't necessarily enable EventHubs completely, but this is attempting to address the first issue hit when attempting to connect to Azure Event Hubs which causes it to crash at startup.
The issue is that in
EventHubs
the replica set is empty and therefore there is no leader in thethis.nodes
list, which blows up whengetLeader()
is called.This change will find the leader in the constructor instead of in the call to
getLeader()
, if there are no replicas (or replica leaders) it will callpartitionInfo.getLeader()
instead, which hopefully does not return null and hopefully will have the correct logic to identify the partition leader, but if it does then can easily be null checked ingetLogDirSize()
which will safely default to 0 in that case.Related To