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()
.