Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
None
-
None
-
None
Description
In SegmentedRaftLog#syncWithSnapshot, if the snapshot index is the last open segment index, then the open segment is finalized and closed (which releases the SegmentedRaftLogOutputStream). In the next step, while rolling the open segment in the cache, a new open segment is created. However, the output stream has already been closed. This causes the peer to terminate when a transaction comes in after the syncWithSnapshot call.
@Override public void execute() throws IOException { if (stateMachineDataPolicy.isSync() && stateMachineFuture != null) { stateMachineDataPolicy.getFromFuture(stateMachineFuture, () -> this + "-writeStateMachineData"); } raftLogMetrics.onRaftLogAppendEntry(); Preconditions.assertTrue(out != null); Preconditions.assertTrue(lastWrittenIndex + 1 == entry.getIndex(),
Instead of creating a new open segment here, we should let any new transaction coming in to the system create a new open segment through the StartOpenSegment call which re-initializes the output stream.
Attachments
Issue Links
- is required by
-
HDDS-3698 Ozone Non-Rolling upgrades
- Resolved
- links to