Skip to content

Commit 156bc23

Browse files
fix(dgraph): Fix snapshot calculation in ludicrous mode (#5585)
In ludicrous mode snapshot calculation is not happening correctly. This is resulting in no snapshot being taken ever and hence w directory size is increasing with time. For snapshot creation we need last applied raft index(such that all raft index entries before this index are also applied) and max timestamp out of all committed transactions. Committed transactions are sent by Zero to all alpha leaders via subscription. In ludicrous mode we don't send transaction to Zero while committing. Hence Zero doesn't have anything to send as part of Oracle updates. Because of this, possible snapshot timestamp(maxCommitTs) in calculateSnapshot() is always 0. Hence no snapshot is ever taken. This PR addresses two issues: Correction while marking raft index done. Now any raft index will only be marked as done once we have applied mutations for proposal(raft entry). For ludicrous mode, use StartTs of any transaction for calculating maxCommitTs snapshot in calculateSnapshot()
1 parent 1167250 commit 156bc23

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)