• Kirill Smelkov's avatar
    go/zodb: ΔTail · d8e9d7a9
    Kirill Smelkov authored
    Add ΔTail - utility class to keep track of history tail of revisional
    changes. This will be needed for both DB (to handle invalidations) and
    for raw Cache(*). It also might be useful in places outside of zodb/go -
    for example WCFS from Wendelin.core uses ΔTail to keep track of which
    ZODB revision changed which block of file(+).
    
    Please see ΔTail comments for details.
    
    (*) to check a bit ahead on load to see whether loaded serial is
    actually the latest one for ≤ Cache.head, and, if yes, mark
    corresponding cache entry as having .head="current" so that the entry
    coverage could be extended when Cache.head is extended to cover more
    database state instead of loading the same data from the database again.
    
    (+) that's why we have δtail.go.cat-generic, so that third-party
    packages could adapt ΔTail to needed types.
    d8e9d7a9
δtail.go 7.31 KB