You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Ivan Andika (Jira)" <ji...@apache.org> on 2026/02/02 03:57:00 UTC
[jira] [Updated] (RATIS-2390) Granular segment lock for SegmentedRaftLog
[ https://issues.apache.org/jira/browse/RATIS-2390?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ivan Andika updated RATIS-2390:
-------------------------------
Component/s: RaftLog
> Granular segment lock for SegmentedRaftLog
> ------------------------------------------
>
> Key: RATIS-2390
> URL: https://issues.apache.org/jira/browse/RATIS-2390
> Project: Ratis
> Issue Type: Improvement
> Components: RaftLog
> Reporter: Ivan Andika
> Priority: Major
>
> Currently, SegmentedRaftLog uses RaftLogBase.lock for all its operations even those that only operates on certain segments (e.g. purge, appends). It might be possible to reduce contention by having a unique lock per segment.
> For example, operations that need to operate on segments only need to hold read lock on RaftLogBase.lock and subsequently try to hold SegmentedRaftLog segment locks. We can implement something like writeLock(TermIndex fromIndex, TermIndex toIndex) and SegmentedRaftLog should only pick the segments locks for that range.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)