[
https://issues.apache.org/jira/browse/HDDS-16497?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ivan Andika updated HDDS-16497:
-------------------------------
Description:
While working on HDDS-15089, encountered an NPE issue that was caused by null
Server.getRemoteUser() in OzoneManager#getS3VolumeContext. This reason is that
Ratis would call StateMachine#query in a separate thread (under
RaftServerImpl#clientExecutor). Therefore, the ThreadLocal in OzoneManager and
the CurrCall which is used by Server.getRemoteUser() is not going to be
propagated. This affects all read requests submitted to Ratis that require
using ThreadLocal one way or another.
We need a way to propagate the Server#getCurrcall ThreadLocal context to the
StateMachine#query.
*Note this suggests that follower read feature is not production ready until
this is resolved.*
was:
While working on HDDS-15089, encountered an NPE issue that was caused by null
Server.getRemoteUser() in OzoneManager#getS3VolumeContext. This reason is that
Ratis would call StateMachine#query in a separate thread (under
RaftServerImpl#clientExecutor). Therefore, the ThreadLocal CurrCall which is
used by Server.getRemoteUser(). This affects all read requests submitted to
Ratis that require using ThreadLocal one way or another.
We need a way to propagate the Server#getCurrcall ThreadLocal context to the
StateMachine#query.
*Note this suggests that follower read feature is not production ready until
this is resolved.*
> Support passing ThreadLocal context to Ratis during query
> ---------------------------------------------------------
>
> Key: HDDS-16497
> URL: https://issues.apache.org/jira/browse/HDDS-16497
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Ivan Andika
> Assignee: Ivan Andika
> Priority: Critical
>
> While working on HDDS-15089, encountered an NPE issue that was caused by null
> Server.getRemoteUser() in OzoneManager#getS3VolumeContext. This reason is
> that Ratis would call StateMachine#query in a separate thread (under
> RaftServerImpl#clientExecutor). Therefore, the ThreadLocal in OzoneManager
> and the CurrCall which is used by Server.getRemoteUser() is not going to be
> propagated. This affects all read requests submitted to Ratis that require
> using ThreadLocal one way or another.
>
> We need a way to propagate the Server#getCurrcall ThreadLocal context to the
> StateMachine#query.
>
> *Note this suggests that follower read feature is not production ready until
> this is resolved.*
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]