jgroups-raft
jgroups-raft copied to clipboard
Small fixes for REDIRECT and FileBasedLog
Just a couple of bug fixes.
The first one was caught in CounterTest. When changing the Options and sending it, the REDIRECT would end up changing the Options#DEFAULT_OPTIONS so subsequent uses would not have the default options. For example, in the test case, the counter's get operation would not return the value because the default options changed.
The second changes the FileBasedLog#truncate(long) to comply with the javadoc, or in other words, only truncate up to the committed index.