Skip to content
Snippets Groups Projects
Commit 4f458942 authored by brinn's avatar brinn
Browse files

change: set a time out of 10s for the hard link creation process in order to...

change: set a time out of 10s for the hard link creation process in order to prevent infinite hangs when using remote file systems

SVN: 5778
parent c4ef78cc
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,12 @@ public final class LinkMakerProvider ...@@ -30,6 +30,12 @@ public final class LinkMakerProvider
private static final String NO_HARD_LINK_EXECUTABLE = "No hard link executable has been found."; private static final String NO_HARD_LINK_EXECUTABLE = "No hard link executable has been found.";
private static final long MILLIS_TO_WAIT_FOR_COMPLETION = 10000L;
private static final long MILLIS_TO_SLEEP_AFTER_COPY_FAILS = 3000L;
private static final int MAX_COPY_RETRIES = 7;
private static IPathImmutableCopier hardLinkMaker; private static IPathImmutableCopier hardLinkMaker;
private LinkMakerProvider() private LinkMakerProvider()
...@@ -39,7 +45,9 @@ public final class LinkMakerProvider ...@@ -39,7 +45,9 @@ public final class LinkMakerProvider
private final static IPathImmutableCopier tryCreateHardLinkMaker() private final static IPathImmutableCopier tryCreateHardLinkMaker()
{ {
final IPathImmutableCopier copier = RecursiveHardLinkMaker.tryCreate(); final IPathImmutableCopier copier =
RecursiveHardLinkMaker.tryCreateRetrying(MILLIS_TO_WAIT_FOR_COMPLETION,
MAX_COPY_RETRIES, MILLIS_TO_SLEEP_AFTER_COPY_FAILS);
if (copier != null) if (copier != null)
{ {
return copier; return copier;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment