You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ratis.apache.org by GitBox <gi...@apache.org> on 2020/12/07 12:20:11 UTC

[GitHub] [incubator-ratis] runzhiwang opened a new pull request #333: RATIS-1215. Allow put duplicate key into LogSegment#entryCache

runzhiwang opened a new pull request #333:
URL: https://github.com/apache/incubator-ratis/pull/333


   ## What changes were proposed in this pull request?
   
   Currently, duplicated key maybe put into entryCache by different threads loading segment file at the same time. So we should allow it.
   
   For example.
   
   First thread's stack:
   ```
   org.apache.ratis.server.raftlog.segmented.LogSegment$LogEntryLoader|LogSegment.java|245|load
   org.apache.ratis.server.raftlog.segmented.LogSegment|LogSegment.java|363|loadCache
   org.apache.ratis.server.raftlog.segmented.SegmentedRaftLog|SegmentedRaftLog.java|275|get
   org.apache.ratis.server.impl.StateMachineUpdater|StateMachineUpdater.java|223|applyLog
   org.apache.ratis.server.impl.StateMachineUpdater|StateMachineUpdater.java|176|run
   ```
   
   Second thread's stack:
   ```
   org.apache.ratis.server.raftlog.segmented.LogSegment$LogEntryLoader|LogSegment.java|245|load
   org.apache.ratis.server.raftlog.segmented.LogSegment|LogSegment.java|363|loadCache
   org.apache.ratis.server.raftlog.segmented.SegmentedRaftLog|SegmentedRaftLog.java|275|get
   org.apache.ratis.server.impl.LeaderStateImpl|LeaderStateImpl.java|736|updateCommit
   org.apache.ratis.server.impl.LeaderStateImpl|LeaderStateImpl.java|689|lambda$updateCommit$12
   java.util.Optional|Optional.java|159|ifPresent
   org.apache.ratis.server.impl.LeaderStateImpl|LeaderStateImpl.java|689|updateCommit
   org.apache.ratis.server.impl.LeaderStateImpl$StateUpdateEvent|LeaderStateImpl.java|109|execute
   org.apache.ratis.server.impl.LeaderStateImpl$EventProcessor|LeaderStateImpl.java|572|run
   
   ```
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/RATIS-1215
   
   ## How was this patch tested?
   
   No need to add new ut.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ratis] runzhiwang commented on pull request #333: RATIS-1215. Allow put duplicate key into LogSegment#entryCache

Posted by GitBox <gi...@apache.org>.
runzhiwang commented on pull request #333:
URL: https://github.com/apache/incubator-ratis/pull/333#issuecomment-739862451


   @szetszwo Could you help review this patch ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ratis] runzhiwang closed pull request #333: RATIS-1215. Allow put duplicate key into LogSegment#entryCache

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #333:
URL: https://github.com/apache/incubator-ratis/pull/333


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ratis] runzhiwang merged pull request #333: RATIS-1215. Allow put duplicate key into LogSegment#entryCache

Posted by GitBox <gi...@apache.org>.
runzhiwang merged pull request #333:
URL: https://github.com/apache/incubator-ratis/pull/333


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-ratis] runzhiwang closed pull request #333: RATIS-1215. Allow put duplicate key into LogSegment#entryCache

Posted by GitBox <gi...@apache.org>.
runzhiwang closed pull request #333:
URL: https://github.com/apache/incubator-ratis/pull/333


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org