File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
modules/elasticsearch/src/main/java/org/elasticsearch/env Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ public class NodeEnvironment extends AbstractComponent {
5656 Lock lock = null ;
5757 File dir = null ;
5858 int localNodeId = -1 ;
59- for (int i = 0 ; i < 100 ; i ++) {
59+ IOException lastException = null ;
60+ for (int i = 0 ; i < 50 ; i ++) {
6061 dir = new File (new File (environment .dataWithClusterFile (), "nodes" ), Integer .toString (i ));
6162 if (!dir .exists ()) {
6263 dir .mkdirs ();
@@ -71,11 +72,11 @@ public class NodeEnvironment extends AbstractComponent {
7172 break ;
7273 }
7374 } catch (IOException e ) {
74- // ignore
75+ lastException = e ;
7576 }
7677 }
7778 if (lock == null ) {
78- throw new IOException ("Failed to obtain node lock" );
79+ throw new IOException ("Failed to obtain node lock" , lastException );
7980 }
8081 this .localNodeId = localNodeId ;
8182 this .lock = lock ;
You can’t perform that action at this time.
0 commit comments