This avoids starvation when the archive directory is large and takes a long time to iterate through. Signed-off-by: Duo Zhang <zhangduo@apache.org> Signed-off-by: Anoop Sam John <anoopsamjohn@apache.org> Signed-off-by: Pankaj <pankajkumar@apache.org>