[ 
https://issues.apache.org/jira/browse/HDFS-12735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16244940#comment-16244940
 ] 

Tsz Wo Nicholas Sze commented on HDFS-12735:
--------------------------------------------

It needs a 
[TaskQueue|https://github.com/apache/incubator-ratis/blob/master/ratis-common/src/main/java/org/apache/ratis/util/TaskQueue.java]
 per object.  I actually created it for the Ozone use case.
{code}
/**
 * A queue with execution order guarantee such that
 * each task is submitted for execution only if it becomes the head of the 
queue.
 * Tasks are executed sequentially without any overlap.
 *
 * By the definition of a queue, a task can become the head iff
 * (1) the queue is empty when offering it, or
 * (2) it is the next to the head and the head is polled out from the queue.
 *
 * A typically use case is to submit concurrent tasks
 * with in-order guarantee for some of the tasks.
 *
 * One example use case is to submit tasks to write multiple files:
 * - A file may requires multiple write tasks.
 * - Multiple files are written at the same time.
 * A solution is to create a {@link TaskQueue} for each file
 * and then submit the write tasks to the corresponding queue.
 * The files will be written concurrently and the writes to each file are 
in-order.
 */
{code}


> Make ContainerStateMachine#applyTransaction async
> -------------------------------------------------
>
>                 Key: HDFS-12735
>                 URL: https://issues.apache.org/jira/browse/HDFS-12735
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Lokesh Jain
>            Assignee: Lokesh Jain
>              Labels: performance
>         Attachments: HDFS-12735-HDFS-7240.000.patch, 
> HDFS-12735-HDFS-7240.001.patch
>
>
> Currently ContainerStateMachine#applyTransaction makes a synchronous call to 
> dispatch client requests. Idea is to have a thread pool which dispatches 
> client requests and returns a CompletableFuture.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to