[
https://issues.apache.org/jira/browse/RATIS-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated RATIS-1195:
------------------------------------
Fix Version/s: 2.0.0
(was: 1.1.0)
> Log Entry Validation in appendEntry can fail after log purge.
> -------------------------------------------------------------
>
> Key: RATIS-1195
> URL: https://issues.apache.org/jira/browse/RATIS-1195
> Project: Ratis
> Issue Type: Bug
> Components: server
> Affects Versions: 1.1.0
> Reporter: Aravindan Vijayan
> Assignee: Aravindan Vijayan
> Priority: Major
> Fix For: 2.0.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> After a log purge is done to the last log index,
> RaftLog#getLastEntryTermIndex will return a *null*. In
> RaftLog#validateLogEntry, when the last term index is null, the expectation
> is that the new entry to be appended is lastSnapshotIndex + 1. However, the
> 'lastSnapshotIndex' in RaftLog is updated only through installSnapshot calls.
> Hence, the validation fails and all further appends will fail until a restart.
> {code}
> java.lang.IllegalStateException: Difference between entry index and RaftLog's
> latest snapshot index -1 is greater than 1 and in between log entries are not
> present, entry: term: 2
> index: 326
> stateMachineLogEntry {
> logData:
> "\b\v\022\000\032\023client-46A48A10F5C6\"\033\n\006hadoop\032\f192.168.48.7\"\003om1Za\n_\n\006hadoop\022\006hadoop\032\004vol3
>
> \377\377\377\377\377\377\377\377\377\0012\017\b\001\022\006hadoop\032\001\200
> \0002\016\b\002\022\005users\032\001\200
> \0008\215\343\333\251\342.@\000H\000P\215\343\333\251\342.X\377\377\377\377\377\377\377\377\377\001"
> clientId: "\000\f\356MU\026<\331\234;\216\t\352\237\371\027"
> callId: 1
> }
> {code}
> cc [~hanishakoneru] / [~msingh]
--
This message was sent by Atlassian Jira
(v8.20.7#820007)