Skip to content

Commit

Permalink
Disable invalidation time
Browse files Browse the repository at this point in the history
  • Loading branch information
ssyssy committed Jun 27, 2024
1 parent dee4187 commit 95fde63
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 674 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,11 @@ public UfsSyncPathCache(Clock clock) {
if (onRemoval != null) {
onRemoval.accept((String) removal.getKey(), (SyncState) removal.getValue());
}
onCacheEviction((String) removal.getKey(), (SyncState) removal.getValue());
// We decide to stop updating invalidation time for paths in order to avoid
// paths got evicted recursively. Stopping calling this onCacheEviction
// function will result in stopping updating invalidation time for all paths.
// Since no one is using this invalidation time feature, we decide to disable
// updating invalidation time.
}
})
.maximumSize(Configuration.getInt(
Expand Down Expand Up @@ -169,6 +173,7 @@ public SyncCheck shouldSyncPath(AlluxioURI path, long intervalMs, DescendantType
syncState = currPath.equals(AlluxioURI.SEPARATOR) ? mRoot : mItems.getIfPresent(currPath);
if (syncState != null) {
// we always check if the current path has been invalidated
// This invalidation time will never be updated.
lastInvalidationTime = Math.max(lastInvalidationTime,
syncState.mInvalidationTime);
switch (parentLevel) {
Expand All @@ -186,6 +191,7 @@ public SyncCheck shouldSyncPath(AlluxioURI path, long intervalMs, DescendantType
case ONE:
lastSyncTime = Math.max(lastSyncTime, syncState.mDirectChildrenSyncTime);
// since we are syncing the children, we must check if a child was invalidated
// This invalidation time will never be updated.
lastInvalidationTime = Math.max(lastInvalidationTime,
syncState.mDirectChildrenInvalidation);
break;
Expand All @@ -195,6 +201,7 @@ public SyncCheck shouldSyncPath(AlluxioURI path, long intervalMs, DescendantType
lastSyncTime = Math.max(lastSyncTime, syncState.mRecursiveSyncTime);
// since we are syncing recursively, we must check if any recursive
// child was invalidated
// This invalidation time will never be updated.
lastInvalidationTime = Math.max(lastInvalidationTime,
syncState.mRecursiveChildrenInvalidation);
break;
Expand Down
Loading

0 comments on commit 95fde63

Please sign in to comment.