Skip to content

Reseting a log doesn't take the snapshotted index into account #557

@mkuratczyk

Description

@mkuratczyk

Describe the bug

When testing network partitions we've hit a rare case: server-0 was partitioned minority). the leader of term 1 on server-1 took a snapshot at index 7267 then wrote three more commands which were uncommitted when the partition happened. Another leader got elected for term 2 and when server-1 was asked to reset it's log to 7267 it couldn't as the code to reset a log doesn't take the snapshotted index into account.

Reproduction steps

logs.tar.gz

Expected behavior

.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions