jgroups-extras / jgroups-raft

Implementation of the RAFT consensus protocol in JGroups

Home Page:https://jgroups-extras.github.io/jgroups-raft/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RAFT.logSizeInBytes() has a cost of O(n)

belaban opened this issue · comments

It iterates through all enries in range [first-appended .. last-appended] using Log.forEach().
Both FileBasedLog and LevelDBLog have a way of returning the approximate number of bytes of the log, so this can be added as Log.sizeInBytes().