objectstore: clamp mtime on commit
When we commit objects to the store and there is a `source_epoch` set on the `Object`, clamp the mtime. This is needed because it is possible that the object corresponds to the last stage of a pipeline[1] and it could later directly be exported without going through `finalize` again. Also we are doing in on object itself and not the cloned path so that resuming and checkpointing will behave identical. [1] not even necessarily the pipeline we are currently building.
This commit is contained in:
parent
76197c70c4
commit
15dc8b7a00
1 changed files with 4 additions and 0 deletions
|
|
@ -423,6 +423,10 @@ class ObjectStore(contextlib.AbstractContextManager):
|
|||
|
||||
with self.cache.store(object_id) as name:
|
||||
path = os.path.join(self.cache, name)
|
||||
# we clamp the mtime of `obj` itself so that it
|
||||
# resuming a snapshop and building with a snapshot
|
||||
# goes through the same code path
|
||||
obj.clamp_mtime()
|
||||
obj.clone(path)
|
||||
|
||||
def cleanup(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue