• Kirill Smelkov's avatar
    bigfile/zodb: Fix thinko in ZBlk1.setblkdata() · cdc6eda0
    Kirill Smelkov authored
    ZBlk1.setblkdata() has logic to detect CHUNKSIZE change, and if so
    recreate whole chunktab from scratch for simplicity. There was a thinko
    however - len(chunk.data) == CHUNKSIZE is ok and actually very often
    happens when data does not have zeroes.
    
    Because of this off-by-1 comparison mistake, ZData objects were
    constantly created and thrown out instead of being reused which led to
    fast ZODB growth.
    
    Fix it.
    
    /reported-by @Tyagov
    cdc6eda0
test_filezodb.py 21.4 KB