For ONOS-356

- Add current InstallationFuture information on TimeoutException
- Set timeout values propotional to batch size
- Fix for ConcurrentModificationException
- Check if src/dst is part of the graph before path computation

Change-Id: Iabeac7939c52502b83bf9ebcbe2023539de3ae99
diff --git a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
index 7cc5d47..22673b6 100644
--- a/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
+++ b/core/net/src/main/java/org/onlab/onos/net/intent/impl/ObjectiveTracker.java
@@ -169,8 +169,10 @@
                                         linkEvent.subject().isDurable())) {
                             final LinkKey linkKey = linkKey(linkEvent.subject());
                             Set<IntentId> intentIds = intentsByLink.get(linkKey);
-                            log.debug("recompile triggered by LinkDown {} {}", linkKey, intentIds);
-                            toBeRecompiled.addAll(intentIds);
+                            synchronized (intentsByLink) {
+                                log.debug("recompile triggered by LinkDown {} {}", linkKey, intentIds);
+                                toBeRecompiled.addAll(intentIds);
+                            }
                         }
                         recompileOnly = recompileOnly &&
                                 (linkEvent.type() == LINK_REMOVED ||