Skip to content

Commit

Permalink
pool: don't update atime on flush
Browse files Browse the repository at this point in the history
Motivation:

The onFlush checksum option calculates the checksum before the file is
flushed to tape.  To do this, it must access that file's data.

Currently, that access results in the file's atime being update, despite
this access not involving a client.

Modification:

Instruct the access not to trigger an atime update.

Result:

The checksum policy onFlush no longer triggers an update a file's atime.

Target: master
Request: 5.0
Request: 4.2
Request: 4.1
Request: 4.0
Request: 3.2
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/11504/
Acked-by: Tigran Mkrtchyan
  • Loading branch information
paulmillar committed Feb 5, 2019
1 parent 35a4f96 commit 5c8685e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -109,14 +109,14 @@
import org.dcache.pool.repository.ReplicaDescriptor;
import org.dcache.pool.repository.ReplicaState;
import org.dcache.pool.repository.Repository;
import org.dcache.pool.repository.Repository.OpenFlags;
import org.dcache.pool.repository.StateChangeEvent;
import org.dcache.pool.repository.StateChangeListener;
import org.dcache.pool.repository.StickyChangeEvent;
import org.dcache.util.CacheExceptionFactory;
import org.dcache.util.Checksum;
import org.dcache.vehicles.FileAttributes;


import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkNotNull;
import static com.google.common.collect.Iterables.transform;
Expand Down Expand Up @@ -838,7 +838,7 @@ private class FlushRequestImpl extends AbstractRequest<PnfsId> implements FlushR
public FlushRequestImpl(NearlineStorage nearlineStorage, PnfsId pnfsId) throws CacheException, InterruptedException
{
super(nearlineStorage);
descriptor = repository.openEntry(pnfsId, NO_FLAGS);
descriptor = repository.openEntry(pnfsId, EnumSet.of(OpenFlags.NOATIME));
infoMsg = new StorageInfoMessage(cellAddress, pnfsId, false);
infoMsg.setStorageInfo(descriptor.getFileAttributes().getStorageInfo());
String path = descriptor.getFileAttributes().getStorageInfo().getKey("path");
Expand Down

0 comments on commit 5c8685e

Please sign in to comment.