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

Jing Zhao updated RATIS-70:
---------------------------
    Attachment: RATIS-70.002.patch

Thanks a lot for the review, Nicholas! Update the patch to address your 
comments. Also added RaftLog#getTermIndex(long) and used it instead of 
RaftLog#get(long) in case that we only need TermIndex information.

bq. It look like that LogSegment.configEntries is not needed since the entry is 
in entryCache

The main usage of configEntries is to remove the dependency of the entry cache 
when checking if an entry with the given index is for re-configuration. The 
current code still has all the entries in the cache, but later we will add 
eviction/loading policies thus the assumption will no longer hold. 

> Separate term/index/offset and log entry content in LogSegment
> --------------------------------------------------------------
>
>                 Key: RATIS-70
>                 URL: https://issues.apache.org/jira/browse/RATIS-70
>             Project: Ratis
>          Issue Type: Sub-task
>            Reporter: Jing Zhao
>            Assignee: Jing Zhao
>         Attachments: RATIS-70.000.patch, RATIS-70.001.patch, 
> RATIS-70.002.patch
>
>
> The current RaftLogCache consists of LogSegment, and logSegment consists of 
> log entries. Instead of directly storing all the log entries, we should 
> separate the term/index/offset information and the entry content information. 
> The former part is more like the index information and can be always kept in 
> the memory. The entry content part can later be evicted from the memory based 
> on eviction policies.



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

Reply via email to