[
https://issues.apache.org/jira/browse/RATIS-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16923078#comment-16923078
]
Mukul Kumar Singh commented on RATIS-619:
-----------------------------------------
[~szetszwo], I had marked this as blocker by mistake.
The reason for moving away from the original idea is this.
Leader{L(101), S(100)}, F{L(98), S(0)}, where L is log index and S is snapshot
index.
If here if the leader restart, then the follower will not be able to read the
logs from the leader because the log index 99 and after are not loaded. Which
will cause the ratis pipeline to install snapshot.
This in case of Ozone will lead to pipeline failure, which will destroy the
ozone data pipeline.
In order to work around this, I suggest that we load up all the available log
indexes and just load only the ones required into the memory.
> Avoid loading cache with pre-snapshot entries for the group
> -----------------------------------------------------------
>
> Key: RATIS-619
> URL: https://issues.apache.org/jira/browse/RATIS-619
> Project: Ratis
> Issue Type: Bug
> Components: server
> Affects Versions: 0.3.0
> Reporter: Mukul Kumar Singh
> Assignee: Siddharth Wagle
> Priority: Major
> Labels: ozone
> Attachments: RATIS-619.01.patch, RATIS-619.02.patch
>
>
> Even after taking a snapshot, the raft log loads all the segment in the log
> {code}
> 2019-07-01 23:22:47,481 [pool-18-thread-1] INFO - Setting the last
> applied index to (t:2, i:15237039)
> {code}
> {code}
> 2019-07-01 23:22:47,516 INFO org.apache.ratis.server.RaftServerConfigKeys:
> raft.server.log.statemachine.data.caching.enabled = true (custom)
> 2019-07-01 23:22:47,531 INFO org.apache.ratis.server.impl.RaftServerImpl:
> 62941ca3-f244-4298-8497-f4c0bd57430a:group-4D230AB58084 set configuration 0:
> [1f3d7936-cb4e-4b68-86ed-578070472dea:1
> 0.17.213.36:9858, 62941ca3-f244-4298-8497-f4c0bd57430a:10.17.213.35:9858,
> f07c1f87-b377-40d9-8c56-4f1440c4fa77:10.17.213.37:9858], old=null at 0
> 2019-07-01 23:22:47,578 INFO org.apache.hadoop.http.HttpServer2: Jetty bound
> to port 9882
> 2019-07-01 23:22:47,579 INFO org.eclipse.jetty.server.Server:
> jetty-9.3.24.v20180605, build timestamp: 2018-06-05T10:11:56-07:00, git hash:
> 84205aa28f11a4f31f2a3b86d1bba2cc8ab69827
> 2019-07-01 23:22:47,601 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7461
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230
> ab58084/current/log_0-7460
> 2019-07-01 23:22:47,608 INFO org.eclipse.jetty.server.handler.ContextHandler:
> Started
> o.e.j.s.ServletContextHandler@6ce90bc5{/logs,file:///var/log/ozone/,AVAILABLE}
> 2019-07-01 23:22:47,608 INFO org.eclipse.jetty.server.handler.ContextHandler:
> Started
> o.e.j.s.ServletContextHandler@4b1c0397{/static,jar:file:/var/lib/hadoop-ozone/ozone-0.5.0-SNAPSHOT/share
> /ozone/lib/hadoop-hdds-container-service-0.5.0-SNAPSHOT.jar!/webapps/static,AVAILABLE}
> 2019-07-01 23:22:47,635 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7386
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230
> ab58084/current/log_7461-14846
> 2019-07-01 23:22:47,663 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7440
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230
> ab58084/current/log_14847-22286
> 2019-07-01 23:22:47,664 INFO org.eclipse.jetty.server.handler.ContextHandler:
> Started
> o.e.j.w.WebAppContext@8a62297{/,file:///tmp/jetty-0.0.0.0-9882-hddsDatanode-_-any-7539213566265642568.di
> r/webapp/,AVAILABLE}{/hddsDatanode}
> 2019-07-01 23:22:47,681 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7353
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230
> ab58084/current/log_22287-29639
> 2019-07-01 23:22:47,695 INFO org.eclipse.jetty.server.AbstractConnector:
> Started ServerConnector@5116ac09{HTTP/1.1,[http/1.1]}{0.0.0.0:9882}
> 2019-07-01 23:22:47,695 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7291
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230
> ab58084/current/log_29640-36930
> 2019-07-01 23:22:47,695 INFO org.eclipse.jetty.server.Server: Started @56648ms
> 2019-07-01 23:22:47,695 INFO org.apache.hadoop.hdds.server.BaseHttpServer:
> HTTP server of HDDSDATANODE is listening at http://0.0.0.0:9882
> 2019-07-01 23:22:47,709 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7049
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230
> ab58084/current/log_36931-43979
> 2019-07-01 23:22:47,732 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7141
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230
> ab58084/current/log_43980-51120
> 2019-07-01 23:22:47,747 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7321
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230ab58084/current/log_51121-58441
> 2019-07-01 23:22:47,768 INFO
> org.apache.ratis.server.raftlog.segmented.LogSegment: Successfully read 7081
> entries from segment file
> /data/1/ozone-0701/ratis/log/f7ddda32-45e0-4bec-a3e7-4d230ab58084/current/log_58442-65522
> {code}
--
This message was sent by Atlassian Jira
(v8.3.2#803003)