-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
es client afterFn should check the case of resp == nil #1440
Comments
Hi @YEXINGZHE54 , how often does this problem occur? Do you have the logs showing the panic - just curious if there is any other information that would indicate why a nil response would be returned? |
hi, nil response would be returned in some rare case when es client interacting with ES server but got some unexpected failure. In detail: inside file gopkg.in/olivere/elastic.v5/bulk.go#191, the *BulkService.Do(ctx context.Context) (*BulkResponse, error) function will return a nil response if any error happened, and then inside file gopkg.in/olivere/elastic.v5/bulk_processor.go#531, *bulkWorker.commit(ctx context.Context) function call afterFn, without checking whether resp is nil; and then the nil resp would be passed into After callback defined inside jaeger config.go |
@YEXINGZHE54 Ok thanks - would you be interested in contributing a fix for this? |
OK, I would like to do it. |
Requirement - jaeger working with ElasticSearch
Problem - jaeger not checking whether es response is nil, and then process panic and exit
Proposal - what do you suggest to solve the problem or improve the existing situation?
add nil pointer check before using es response pointer, such as :
jaeger/pkg/es/config/config.go
Line 117 in 21e9ab4
Any open questions to address
The text was updated successfully, but these errors were encountered: