Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fuse metadata cache outdated issue after chmod/chown #18524

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -28,8 +28,12 @@
import alluxio.grpc.ListStatusPOptions;
import alluxio.grpc.OpenFilePOptions;
import alluxio.grpc.RenamePOptions;
import alluxio.grpc.SetAclAction;
import alluxio.grpc.SetAclPOptions;
import alluxio.grpc.SetAttributePOptions;
import alluxio.metrics.MetricKey;
import alluxio.metrics.MetricsSystem;
import alluxio.security.authorization.AclEntry;
import alluxio.util.FileSystemOptionsUtils;
import alluxio.util.ThreadUtils;
import alluxio.wire.BlockLocationInfo;
Expand Down Expand Up @@ -255,6 +259,22 @@ public synchronized void close() throws IOException {
}
}

@Override
public void setAcl(AlluxioURI path, SetAclAction action, List<AclEntry> entries,
SetAclPOptions options) throws FileDoesNotExistException, IOException, AlluxioException {
mMetadataCache.invalidate(path.getParent());
mMetadataCache.invalidate(path);
mDelegatedFileSystem.setAcl(path, action, entries, options);
}

@Override
public void setAttribute(AlluxioURI path, SetAttributePOptions options)
throws FileDoesNotExistException, IOException, AlluxioException {
mMetadataCache.invalidate(path.getParent());
mMetadataCache.invalidate(path);
mDelegatedFileSystem.setAttribute(path, options);
}

/**
* Best efforts to drops metadata cache of a given uri,
* all its ancestors and descendants.
Expand Down