refactor: assert index is <= applied in compact_log instead of truncating
We used to automatically truncate the index in compact_log if the caller requested to compact too many entries. This made it so that the requirement of not compacting any un-applied entries was implicit in our code base, which is not good as it allows for some bugs to creep in (like the one we fix a couple commits ago). Now this is changed and instead of silently adjusting the index of last compacted entry, we just assert that it's no greater than the applied index. As a consequence there's a minor improvement in do_raft_log_auto_compaction function.
parent
1161519a
No related branches found
No related tags found
Pipeline #59021 failed
Stage: build-base-image
Stage: test
Stage: docker
Stage: build-stress-image
Stage: stress-test
Stage: deploy