-
Notifications
You must be signed in to change notification settings - Fork 26.4k
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 6856 DubboHandlerRegistry#removeService NPE issue. #7286
Conversation
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.
LGTM.
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.
The problem in DubboShutdownHook#destroyProtocols. It will destory all loaded protocols.
There will be GrpcProtocol and RegistryProtocol, the registryProtocol wrap GrpcProtol.
When GrpcProtol destory, the export will be destory, and the export will be removed from exportMap.
And in RegistryProtocol, it will unexport the grpcProtocol again, though the exportMap already clear, but the runnable which to remove handlerRegistry service still be execute.
This comment has been minimized.
This comment has been minimized.
Lines 1255 to 1282 in 34b744b
And in dubboBootstrap#destory(), the line_1258 and line_1269 is repetitive, line_1269 can be remove. |
If (exporterMap.remove(uri) != null && runnable != null) can also solve the problem. Now the removal logic of AbstractExporter is moved to the unexport method of the parent class. By using the unexport variable in the parent class to control whether Perform subsequent resource destruction, see https://github.com/apache/dubbo/pull/7286/files |
I check it agian, that's fine. |
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.
LGTM.
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.
LGTM.
@xiaoheng1 @horizonzy Thanks for contribution |
What is the purpose of the change
fix DubboHandlerRegistry#removeService NPE issue.
see more detail from #6856.
Brief changelog
XXXXX
Verifying this change
XXXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[Dubbo-XXX] Fix UnknownException when host config not exist #XXX
. Each commit in the pull request should have a meaningful subject line and body.mvn clean install -DskipTests=false
&mvn clean test-compile failsafe:integration-test
to make sure unit-test and integration-test pass.