You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "runzhiwang (Jira)" <ji...@apache.org> on 2021/02/02 05:57:00 UTC
[jira] [Updated] (RATIS-1195) Log Entry Validation in appendEntry
can fail after log purge.
[ https://issues.apache.org/jira/browse/RATIS-1195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
runzhiwang updated RATIS-1195:
------------------------------
Fix Version/s: (was: 2.0.0)
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: 2.0.0
> Reporter: Aravindan Vijayan
> Assignee: Aravindan Vijayan
> Priority: Major
> Fix For: 1.1.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.3.4#803005)