dotmesh-io / dotmesh

dotmesh (dm) is like git for your data volumes (databases, files etc) in Docker and Kubernetes
https://dotmesh.com
Apache License 2.0
539 stars 29 forks source link

fix dirty data accounting wrt fastdiff #722

Closed lukemarsden closed 4 years ago

lukemarsden commented 5 years ago

include dirty data accounting from the tmp (fastdiff) snapshot if it exists

also, check if we're in the case where both the latest snapshots both have a zero "used" value. in this case, because zfs space accounting for "used" values for snapshots only reports blocks unique to that snapshot, we'll fail to detect changes to the filesystem in the dirty data algorithm. in this case, we need to clean up the tmp snapshot before proceeding, otherwise we risk missing filesystem changes.