Describe the feature:
BulkProcessor lost threadPool().getThreadContext().getHeader
Elasticsearch version (bin/elasticsearch --version):
5.5x
Plugins installed: []
JVM version (java -version):
OS version (uname -a if on a Unix-like system):
linux macos
Description of the problem including expected versus actual behavior:
Steps to reproduce:
Please include a minimal but complete recreation of the problem, including
(e.g.) index creation, mappings, settings, query etc. The easier you make for
us to reproduce it, the more likely that somebody will take the time to look at it.
Provide logs (if relevant):
when I use transport client, put header to threadpool.threadContext.header,
but sometime ,the header lost.
I'm cp BulkProcessor.java BulkRequestHandler.java
and add log to print threadpool.threadContext.header, it's lost by sometime.
client code:
client.threadPool().getThreadContext().putHeader("Authorization", token);
BulkRequestHandler update code:

output:
