Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Behaviour on setting TrailingLogs to 0 #86

Open
fahadullah opened this issue Feb 13, 2016 · 1 comment
Open

Behaviour on setting TrailingLogs to 0 #86

fahadullah opened this issue Feb 13, 2016 · 1 comment
Labels
Milestone

Comments

@fahadullah
Copy link

https://gist.github.com/fahadullah/e49a4578094f4efd7746

If TrailingLogs is set to 0 and raft node is restarted right after taking a snapshot, it tries to look up the last index but all entries were already compacted. TrailingLogs being 0 should be a valid config though a little inefficient under certain cases.

@slackpad slackpad added the bug label Mar 29, 2016
@armon armon mentioned this issue Mar 29, 2016
14 tasks
@slackpad slackpad added this to the v2 milestone Oct 7, 2016
@Lz-Gustavo
Copy link
Contributor

Is this still an observed issue on the current version?

Running the same test routine pointed by @fahadullah with some small modifications to adequate to the new API, I've reached the same "log not found" state. At first, I thought there could be a bug on InmemStore DeleteRange(), which is the implementation of LogStore interface used on unit tests. After some time, I've came back to the test definition and I think it's equivocated.

Please correct me if I'm wrong, but the expected log index after a successfully snapshot installation, and entire log truncation, shouldn't be zero? Not 102 as was currently defined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants