Skip to content

Commit

Permalink
Fix ingestion bug where it can lockup on a poorly-placed row with no …
Browse files Browse the repository at this point in the history
…values to ingest
  • Loading branch information
Paul Cuddihy committed Mar 22, 2021
1 parent f977f3c commit 5fa96c2
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ public void run(){
int targetMax = (int) (this.optimalQueryChars * 1.25);

if (queryLen >= targetMin && queryLen <= targetMax) {
System.err.println("query: " + query);
this.endpoint.executeQuery(query, SparqlResultTypes.CONFIRM);

} else {
Expand All @@ -96,6 +97,7 @@ public void run(){

// run queryList
for (String q : queryList) {
System.err.println("q: " + q);
this.endpoint.executeQuery(q, SparqlResultTypes.CONFIRM);
}
}
Expand Down Expand Up @@ -150,13 +152,13 @@ private ArrayList<String> splitIntoQueries(ArrayList<NodeGroup> nodeGroupList) t
queryList.add(subQuery);
longestQueryLen = Math.max(longestQueryLen, subQuery.length());

// get ready for next iteration
index0 += this.recommendedBatchSize;
indexN = Math.min(nodeGroupList.size(), indexN + this.recommendedBatchSize);

} catch (NothingToInsertException e) {
// silently skip
}

// get ready for next iteration
index0 += this.recommendedBatchSize;
indexN = Math.min(nodeGroupList.size(), indexN + this.recommendedBatchSize);
}

} while (longestQueryLen > targetMax && this.recommendedBatchSize > 1);
Expand Down

0 comments on commit 5fa96c2

Please sign in to comment.