• Kirill Smelkov's avatar
    bigfile/zodb: Don't write ZBlk to DB if it was not changed · 6773fda0
    Kirill Smelkov authored
    For ZBlk1 we already compare ZData content about whether it was changed
    compared to data already stored to DB, and do not store it twice if data
    is the same.
    
    However ZBlk itself is always marked as changed, if corresponding memory
    page was dirtied. This results in transactions like
    
    Trans #33915309 tid=03b6944919befeee time=2016-04-17 22:01:06.034237 offset=140320105842
        status=' ' user='...' description='...'
      # ... other parts, but no ZData here
      data #2 oid=000000000026fc4c size=79 class=wendelin.bigfile.file_zodb.ZBlk1
    
    where ZBlk1 is committed the same without necessity.
    
    NOTE we cannot avoid committing ZBlk in all cases, because it is used to signal
        other DB clients that a ZBlk needs to be invalidated and this way associated
        fileh pages are invalidated too.
    
        This cannot work via ZData, because ZData don't have back-pointer to
        ZBlk1 or to corresponding zfile.
    6773fda0
Name
Last commit
Last update
..
tests Loading commit data...
__init__.py Loading commit data...
_bigfile.c Loading commit data...
file_file.py Loading commit data...
file_zodb.py Loading commit data...
pagefault.c Loading commit data...
pagemap.c Loading commit data...
ram.c Loading commit data...
ram_hugetlbfs.c Loading commit data...
ram_shmfs.c Loading commit data...
virtmem.c Loading commit data...