You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Jing Zhao (JIRA)" <ji...@apache.org> on 2017/03/25 00:43:41 UTC

[jira] [Comment Edited] (RATIS-17) Add basic retry cache implementation for Raft Server

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

Jing Zhao edited comment on RATIS-17 at 3/25/17 12:43 AM:
----------------------------------------------------------

bq. The guava Cache is thread safe. Do we need to synchronize queryCache and getOrCreateEntry?

The reason we currently synchronize the queryCache and getOrCreateEntry is that multiple retries of the same request may be handled concurrently (e.g., initially all the retries are sitting in the RPC queue and then get processed by different handlers concurrently). Synchronizing on the retry cache may affect the performance. But maybe we can improve it as a follow-on work (we can do a double check for the cache entry and only lock when there is no entry in the retry cache).


was (Author: jingzhao):
bq. The guava Cache is thread safe. Do we need to synchronize queryCache and getOrCreateEntry?

The reason we currently synchronize the queryCache and getOrCreateEntry is that multiple retries of the same request may be handled concurrently (e.g., initially all the retries are sitting in the RPC queue and then get processed by different handlers concurrently). Synchronizing on the retry cache may affect the performance. But maybe we can improve it as a follow-on work.

> Add basic retry cache implementation for Raft Server
> ----------------------------------------------------
>
>                 Key: RATIS-17
>                 URL: https://issues.apache.org/jira/browse/RATIS-17
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: RATIS-17.000.patch, RATIS-17.001.patch, RATIS-17.002.patch, RATIS-17.003.patch
>
>
> This jira will add the basic data structure definition for the retry cache.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)