Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 4bd1e30

Browse files
authored
Merge pull request #12 from blazegraph/BLAZEGRAPH_RELEASE_2_1_2
Blazegraph release 2 1 2
2 parents b2ba732 + ca37406 commit 4bd1e30

55 files changed

Lines changed: 32007 additions & 2543 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bigdata-blueprints/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.1.1</version>
31+
<version>2.1.2</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-blueprints</artifactId>
36-
<version>2.1.1</version>
36+
<version>2.1.2</version>
3737
<name>Blazegraph Blueprints API</name>
3838
<description>Blazegraph support for Tinkerpop 2.5</description>
3939
<packaging>jar</packaging>

bigdata-cache/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.1.1</version>
31+
<version>2.1.2</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-cache</artifactId>
36-
<version>2.1.1</version>
36+
<version>2.1.2</version>
3737
<name>Blazegraph Cache</name>
3838
<description>Blazegraph Cache utilities</description>
3939
<packaging>jar</packaging>

bigdata-client/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.1.1</version>
31+
<version>2.1.2</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-client</artifactId>
36-
<version>2.1.1</version>
36+
<version>2.1.2</version>
3737
<name>Blazegraph Client API</name>
3838
<description>Blazegraph Client API tools</description>
3939
<build>

bigdata-common-util/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2828
<parent>
2929
<groupId>com.blazegraph</groupId>
3030
<artifactId>blazegraph-parent</artifactId>
31-
<version>2.1.1</version>
31+
<version>2.1.2</version>
3232
<relativePath>../pom.xml</relativePath>
3333
</parent>
3434
<groupId>com.blazegraph</groupId>
3535
<artifactId>bigdata-common-util</artifactId>
36-
<version>2.1.1</version>
36+
<version>2.1.2</version>
3737
<name>Blazegraph Common Utilities</name>
3838
<description>Blazegraph utilities common across artifacts</description>
3939
<build>

bigdata-core-test/bigdata/src/test/com/bigdata/bop/engine/TestQueryEngine.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
import java.util.concurrent.CancellationException;
3737
import java.util.concurrent.ExecutionException;
3838
import java.util.concurrent.Executor;
39+
import java.util.concurrent.Executors;
3940
import java.util.concurrent.FutureTask;
41+
import java.util.concurrent.Semaphore;
4042
import java.util.concurrent.TimeUnit;
4143
import java.util.concurrent.TimeoutException;
4244

@@ -1982,4 +1984,39 @@ private IRunningQuery initQueryWithConditionalRoutingOp(IConstraint condition, i
19821984
return runningQuery;
19831985
}
19841986

1987+
/**
1988+
* Test the LatchExecutor to verify reliable progression with multiple threads contending
1989+
* to add tasks.
1990+
*
1991+
* @throws InterruptedException
1992+
*/
1993+
public void testLatchExecutorProgression() throws InterruptedException {
1994+
LatchedExecutor latched = new LatchedExecutor(
1995+
Executors.newCachedThreadPool(), 1);
1996+
1997+
final Semaphore sem = new Semaphore(1);
1998+
1999+
Runnable task = new Runnable() {
2000+
2001+
@Override
2002+
public void run() {
2003+
2004+
sem.release();
2005+
2006+
}
2007+
2008+
};
2009+
2010+
// Without the fix to the LatchedExecutor.scheduleNext this deadlocks in less than
2011+
// 10,000 iterations
2012+
for (int n = 0; n < (1 * 1024 * 1024); n++) { // try 1 million iterations
2013+
// System.err.println("Iteration: " + n);
2014+
2015+
sem.acquire();
2016+
2017+
latched.execute(task);
2018+
2019+
}
2020+
2021+
}
19852022
}

bigdata-core-test/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2929
<parent>
3030
<groupId>com.blazegraph</groupId>
3131
<artifactId>blazegraph-parent</artifactId>
32-
<version>2.1.1</version>
32+
<version>2.1.2</version>
3333
<relativePath>../pom.xml</relativePath>
3434
</parent>
3535
<groupId>com.blazegraph</groupId>
3636
<artifactId>bigdata-core-test</artifactId>
37-
<version>2.1.1</version>
37+
<version>2.1.2</version>
3838
<packaging>jar</packaging>
3939
<name>Blazegraph Core Tests</name>
4040
<description>Blazegraph Core Platform Test Suites</description>

bigdata-core/bigdata/src/java/com/bigdata/bop/join/PipelinedHashIndexAndSolutionSetJoinOp.java

Lines changed: 5 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
import com.bigdata.bop.IVariable;
3838
import com.bigdata.bop.NV;
3939
import com.bigdata.bop.PipelineOp;
40-
import com.bigdata.bop.PipelineOp.Annotations;
4140
import com.bigdata.bop.controller.INamedSolutionSetRef;
4241
import com.bigdata.bop.controller.SubqueryAnnotations;
4342
import com.bigdata.rdf.sparql.ast.QueryHints;
@@ -392,37 +391,13 @@ public Void call() throws Exception {
392391

393392
try {
394393

395-
if (sourceIsPipeline) {
394+
// Buffer all source solutions.
395+
acceptAndOutputSolutions();
396396

397-
// Buffer all source solutions.
398-
acceptAndOutputSolutions();
397+
if (context.isLastInvocation()) {
399398

400-
if (context.isLastInvocation()) {
401-
402-
// Done. Release the allocation context.
403-
state.release();
404-
405-
}
406-
407-
} else {
408-
409-
if(first) {
410-
411-
// Accept ALL solutions.
412-
acceptAndOutputSolutions();
413-
414-
// Done. Release the allocation context.
415-
state.release();
416-
417-
}
418-
419-
// Copy all solutions from the pipeline to the sink.
420-
BOpUtility.copy(context.getSource(), context.getSink(),
421-
null/* sink2 */, null/* mergeSolution */,
422-
null/* selectVars */, null/* constraints */, stats);
423-
424-
// Flush solutions to the sink.
425-
context.getSink().flush();
399+
// Done. Release the allocation context.
400+
state.release();
426401

427402
}
428403

bigdata-core/bigdata/src/java/com/bigdata/rwstore/RWStore.java

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock;
6363

6464
import org.apache.log4j.Logger;
65+
import org.apache.system.SystemUtil;
6566

6667
import com.bigdata.btree.BTree.Counter;
6768
import com.bigdata.btree.IIndex;
@@ -365,8 +366,18 @@ public interface Options {
365366
*/
366367
String READ_BLOBS_ASYNC = RWStore.class.getName() + ".readBlobsAsync";
367368

368-
String DEFAULT_READ_BLOBS_ASYNC = "true";
369-
369+
/**
370+
* Note: Windows does not handle async IO channel reopens in the same
371+
* fashion as Linux, leading to "overlapping file exceptions" and other
372+
* weirdness. Therefore this option is explicitly disabled by default
373+
* on Windows.
374+
*
375+
* @see https://jira.blazegraph.com/browse/BLZG-1911 (Blazegraph 2.1
376+
* version does not work on Windows (async IO causes file lock
377+
* errors))
378+
*/
379+
String DEFAULT_READ_BLOBS_ASYNC = SystemUtil.isWindows() ? "false" : "true";
380+
370381
/**
371382
* Defines the number of bits that must be free in a FixedAllocator for
372383
* it to be added to the free list. This is used to ensure a level

bigdata-core/bigdata/src/java/com/bigdata/util/concurrent/LatchedExecutor.java

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,28 @@ public void run() {
138138
* <p>
139139
* Pre-condition: The caller has a permit.
140140
*/
141-
private void scheduleNext() {
142-
while (true) {
143-
Runnable next = null;
144-
if ((next = queue.poll()) != null) {
145-
try {
146-
executor.execute(next);
147-
return;
148-
} catch (RejectedExecutionException ex) {
149-
// log error and poll the queue again.
150-
log.error(ex, ex);
141+
private void scheduleNext() {
142+
while (true) {
143+
Runnable next = null;
144+
if ((next = queue.poll()) != null) {
145+
try {
146+
executor.execute(next);
147+
return;
148+
} catch (RejectedExecutionException ex) {
149+
// log error and poll the queue again.
150+
log.error(ex, ex);
151+
continue;
152+
}
153+
} else {
154+
semaphore.release();
155+
156+
// check for a missed enqueue
157+
if (!queue.isEmpty() && semaphore.tryAcquire()) {
151158
continue;
152159
}
153-
} else {
154-
semaphore.release();
155-
return;
156-
}
157-
}
158-
}
159160

161+
return;
162+
}
163+
}
164+
}
160165
}

bigdata-core/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ Copyright 2010 by TalkingTrends (Amsterdam, The Netherlands)
2929
<parent>
3030
<groupId>com.blazegraph</groupId>
3131
<artifactId>blazegraph-parent</artifactId>
32-
<version>2.1.1</version>
32+
<version>2.1.2</version>
3333
<relativePath>../pom.xml</relativePath>
3434
</parent>
3535
<groupId>com.blazegraph</groupId>
3636
<artifactId>bigdata-core</artifactId>
37-
<version>2.1.1</version>
37+
<version>2.1.2</version>
3838
<packaging>jar</packaging>
3939
<name>Blazegraph Core</name>
4040
<description>Blazegraph(TM) DB Core Platform. It contains all Blazegraph DB dependencies other than Blueprints.</description>

0 commit comments

Comments
 (0)