diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java index 4ce6a7f932..1cc4a61e22 100644 --- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java +++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/s3guard/LocalMetadataStore.java @@ -605,12 +605,12 @@ public RenameTracker initiateRenameOperation(final StoreContext storeContext, } @Override - public void setTtlTimeProvider(ITtlTimeProvider ttlTimeProvider) { + public synchronized void setTtlTimeProvider(ITtlTimeProvider ttlTimeProvider) { this.ttlTimeProvider = ttlTimeProvider; } @Override - public void addAncestors(final Path qualifiedPath, + public synchronized void addAncestors(final Path qualifiedPath, @Nullable final BulkOperationState operationState) throws IOException { Collection newDirs = new ArrayList<>();