• Kirill Smelkov's avatar
    go/zodb: DB: preserve δtail not to go down to ø slice on seldom commits · 4224b580
    Kirill Smelkov authored
    If we use only the rule that we keep last 10 minutes of database
    history, and commits come less often than that - e.g. once per 30
    minutes, on every new commit we'll be throwing away all δtail data,
    which would result on completely throwing away live cache on every
    DB.Open .
    
    Add another rule to cover seldom updates spectrum so that we never throw
    till empty δtail and keep at least 10 elements in δtail queue. This will
    make sure that live cache is preserved even when updates to database are
    seldom to come.
    
    Tests pending...
    4224b580
db.go 18.7 KB