Skip to content

Commit

Permalink
Revert "ACS-6168: Add 5 retries when retrieving the temp directory to…
Browse files Browse the repository at this point in the history
… deal with clashes when high load is applied immediatelly at startup"

This reverts commit ab70588.
  • Loading branch information
mstrankowski committed Oct 26, 2023
1 parent ab70588 commit 52147b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,12 @@ private static File getTempDir()

final File systemTempDir = new File(systemTempDirPath);
final File tempDir = new File(systemTempDir, dirName);

int retrieveTempDirAttemptLimit = 5;
for (int i = 0; i < retrieveTempDirAttemptLimit; i++) {
if (tempDir.exists() || tempDir.mkdirs())
{
return tempDir;
}
if (!tempDir.exists() && !tempDir.mkdirs() && !tempDir.exists())
{
throw new RuntimeException("Failed to create temp directory: " + tempDir);
}

throw new RuntimeException("Failed to create temp directory: " + tempDir);
return tempDir;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -230,16 +230,12 @@ private static File getTempDir()

final File systemTempDir = new File(systemTempDirPath);
final File tempDir = new File(systemTempDir, dirName);

int retrieveTempDirAttemptLimit = 5;
for (int i = 0; i < retrieveTempDirAttemptLimit; i++) {
if (tempDir.exists() || tempDir.mkdirs())
{
return tempDir;
}
if (!tempDir.exists() && !tempDir.mkdirs())
{
throw new RuntimeException("Failed to create temp directory: " + tempDir);
}

throw new RuntimeException("Failed to create temp directory: " + tempDir);
return tempDir;
}
}
}

0 comments on commit 52147b7

Please sign in to comment.