Wrap thread creation in doPrivileged call (#85180)
EsExecutors has a thread factory for thread construction, and both creates a thread in a given thread group and sets it as a daemon thread. Currently that thread creation happens in the access control context of the calling code, but this could happen from anywhere inside Elasticsearch. Since the point of EsExecutors is be the one place handling thread creation (for the most part), this should happen in the context of server, without caring about the whatever code triggered the thread pool to expand.
Loading
Please register or sign in to comment