[ 
https://issues.apache.org/jira/browse/HDDS-15684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ivan Andika updated HDDS-15684:
-------------------------------
    Description: 
Just an idea.

Came across 
[https://medium.com/@sgn00/triple-buffer-lock-free-concurrency-primitive-611848627a1e]

We can try to think whether we can use triple buffer to replace the current 
double buffer.

The current weakness of double buffer is that we cannot swap the buffers if 
there is either a read or write in progress (or there might be data 
corruption). Additionally, we still uses locking although technically the Ratis 
applier thread and Ozone Manager double buffer can be reduced to a single SPSC 
problem which might not need any locks.

The third buffer idea will add another buffer. This would decouple the read and 
writer. We can also implement the lockless implementation to improve the 
performance.

  was:
Just an idea.

Came across 
[https://medium.com/@sgn00/triple-buffer-lock-free-concurrency-primitive-611848627a1e]

We can try to think whether we can use triple buffer to replace the current 
double buffer.

The current weakness of double buffer is that we cannot swap the buffers if 
there is either a read or write in progress (or there might be data 
corruption). 

The third buffer idea will add another buffer. This would decouple the read and 
writer. We can also implement the lockless implementation to improve the 
performance.


> Replace OM double buffer with triple buffer
> -------------------------------------------
>
>                 Key: HDDS-15684
>                 URL: https://issues.apache.org/jira/browse/HDDS-15684
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Ivan Andika
>            Assignee: Ivan Andika
>            Priority: Major
>
> Just an idea.
> Came across 
> [https://medium.com/@sgn00/triple-buffer-lock-free-concurrency-primitive-611848627a1e]
> We can try to think whether we can use triple buffer to replace the current 
> double buffer.
> The current weakness of double buffer is that we cannot swap the buffers if 
> there is either a read or write in progress (or there might be data 
> corruption). Additionally, we still uses locking although technically the 
> Ratis applier thread and Ozone Manager double buffer can be reduced to a 
> single SPSC problem which might not need any locks.
> The third buffer idea will add another buffer. This would decouple the read 
> and writer. We can also implement the lockless implementation to improve the 
> performance.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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

Reply via email to