-
Notifications
You must be signed in to change notification settings - Fork 588
HDDS-11396. NPE due to empty Handler#clusterId #7145
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -478,10 +478,10 @@ public void start(String clusterId) throws IOException { | |
| replicationServer.start(); | ||
| datanodeDetails.setPort(Name.REPLICATION, replicationServer.getPort()); | ||
|
|
||
| writeChannel.start(); | ||
| readChannel.start(); | ||
| hddsDispatcher.init(); | ||
| hddsDispatcher.setClusterId(clusterId); | ||
| writeChannel.start(); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @jianghuazhu thanks for reporting the issue and find the root cause.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @ChenSammi for the comment and review.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have updated it. |
||
| readChannel.start(); | ||
| blockDeletingService.start(); | ||
| recoveringContainerScrubbingService.start(); | ||
|
|
||
|
|
||
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.
@jianghuazhu, could you also revert this change if there is no specific reason? The general review guideline that I followed, is focus on the problem, and try not to touch irrelevant code as mush as possible.
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.
Thanks @ChenSammi .
I modified some code here. There are some main reasons:
Cannotshould be changed tocannot.These are related to clusterId, so I updated them together.
This is my idea.
What do you think?
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.
I see. Let's keep the typo change.
It's expected that only one clusterId is valid during the DN lifetime, that clusterId is returned from SCM after DN registered to the SCM. So I will prefer keep the clusterId null check here.
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.
Thanks @ChenSammi .
I have updated it.