You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Tsz Wo Nicholas Sze (JIRA)" <ji...@apache.org> on 2017/08/23 23:28:00 UTC
[jira] [Commented] (RATIS-111) RaftLogWorker may throw
IllegalStateException
[ https://issues.apache.org/jira/browse/RATIS-111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16139320#comment-16139320 ]
Tsz Wo Nicholas Sze commented on RATIS-111:
-------------------------------------------
I tried to add more debug messages and found that the current code use various ways (java.io.File, NativeIO and java.nio.file.Files) to perform file operations such as delete and rename. Then, I changed all of them to uses java.nio.file.Files and ran the test more than 100 times. The test did not fail for all runs.
> RaftLogWorker may throw IllegalStateException
> ---------------------------------------------
>
> Key: RATIS-111
> URL: https://issues.apache.org/jira/browse/RATIS-111
> Project: Ratis
> Issue Type: Bug
> Reporter: Tsz Wo Nicholas Sze
> Assignee: Tsz Wo Nicholas Sze
> Attachments: org.apache.ratis.server.simulation.TestNotLeaderExceptionWithSimulation-output.txt
>
>
> {code}
> Exception in thread "RaftLogWorker for Storage Directory /Users/szetszwo/hadoop/incubator-ratis/ratis-server/target/test/data/e19600c7a0228b58/MiniRaftClusterWithSimulatedRpc/s3/group-E1192218-3981-4FC5-90BF-4CFB0D270F6B" 2017-08-22 15:52:47,983 INFO impl.RaftServerImpl (RaftLogWorker.java:execute(278)) - RaftLogWorker-s4 finalizing log segment /Users/szetszwo/hadoop/incubator-ratis/ratis-server/target/test/data/e19600c7a0228b58/MiniRaftClusterWithSimulatedRpc/s4/group-E1192218-3981-4FC5-90BF-4CFB0D270F6B/current/log_inprogress_0
> org.apache.ratis.util.ExitUtils$ExitException: RaftLogWorker for Storage Directory /Users/szetszwo/hadoop/incubator-ratis/ratis-server/target/test/data/e19600c7a0228b58/MiniRaftClusterWithSimulatedRpc/s3/group-E1192218-3981-4FC5-90BF-4CFB0D270F6B failed.
> at org.apache.ratis.util.ExitUtils.terminate(ExitUtils.java:88)
> at org.apache.ratis.server.storage.RaftLogWorker.run(RaftLogWorker.java:185)
> at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.IllegalStateException: File /Users/szetszwo/hadoop/incubator-ratis/ratis-server/target/test/data/e19600c7a0228b58/MiniRaftClusterWithSimulatedRpc/s3/group-E1192218-3981-4FC5-90BF-4CFB0D270F6B/current/log_inprogress_0 does not exist.
> at org.apache.ratis.util.Preconditions.assertTrue(Preconditions.java:60)
> at org.apache.ratis.server.storage.RaftLogWorker$FinalizeLogSegment.execute(RaftLogWorker.java:280)
> at org.apache.ratis.server.storage.RaftLogWorker.run(RaftLogWorker.java:155)
> ... 1 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)