From 6c429ed079bdf3518d39d8ea7e4bc2b68b7d256c Mon Sep 17 00:00:00 2001 From: "siba.mishra" Date: Tue, 22 Oct 2019 16:22:08 +0530 Subject: [PATCH] Fix to exceeding lock count limit while clustering. locking happened on graph when neighbours are being checked. But they were not unlocked. This had caused "Maximum lock count exceeded" error for large graphs. Fix is to explicitly unlock after successful checking of presence of neighbours. --- .../asv/gephi/chinesewhispers/ChineseWhispersClusterer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/de/uni_leipzig/informatik/asv/gephi/chinesewhispers/ChineseWhispersClusterer.java b/src/de/uni_leipzig/informatik/asv/gephi/chinesewhispers/ChineseWhispersClusterer.java index 3ba6a37..57e0fec 100644 --- a/src/de/uni_leipzig/informatik/asv/gephi/chinesewhispers/ChineseWhispersClusterer.java +++ b/src/de/uni_leipzig/informatik/asv/gephi/chinesewhispers/ChineseWhispersClusterer.java @@ -91,6 +91,7 @@ public void execute(GraphModel gm) { for (Node node : graph.getNodes()) { if (unconnected == Unconnected.INDIVIDUAL) classes.put(node, counter++); if (graph.getNeighbors(node).iterator().hasNext()) { + graph.readUnlock(); connectedNodes.add(node); if (unconnected != Unconnected.INDIVIDUAL) classes.put(node, counter++); }