Why do mtime and atime need to be updated?

40 Views Asked by At

Does anyone know why the mtime and atime need to be updated when completing the file?

mInodeTree.updateInode(rpcContext, UpdateInodeEntry.newBuilder()

    .setId(inode.getId())
    .setUfsFingerprint(ufsFingerprint)
    .setLastModificationTimeMs(opTimeMs) // mtime?
    .setLastAccessTimeMs(opTimeMs) // atime?
    .setOverwriteModificationTime(true)
    .build();
mInodeTree.updateInodeFile(rpcContext, entry.build());
1

There are 1 best solutions below

0
On BEST ANSWER

In the early days when Alluxio is mostly used for Spark or MR for storing really large files, we were thinking the completion could take a while, thus the completion time may better reflect the mtime and atime. I don’t think there is any particular technical reason behind that