Page MenuHomePhabricator

WDQS Docker Image 0.3.10 fails to load RDF dump: BTree Exception after allocation error (Record exists)
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

We are using the wdqs 0.3.10 docker image (wikibase/wdqs:0.3.10) to load the latest RDF dump into a BlazeGraph journal. We have a reasonable sized hardware environment with sufficient memory, CPU and disk space. We are roughly following steps as defined on https://addshore.com/2019/10/your-own-wikidata-query-service-with-no-limits-part-1/

After about 80% of the data is loaded, we are seeing exception in the blazegraph log, looking like:

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.AssertionError: Record exists for offset in cache: offset=2147483616
	at com.bigdata.rdf.rio.StatementBuffer.flush(StatementBuffer.java:955)
	at com.bigdata.rdf.sail.BigdataSail$BigdataSailConnection.flushStatementBuffers(BigdataSail.java:4152)

We tried to load the data also with slightly different memory settings, or chunking settings during the munge process, same result.

After the third attempt we have tried to investigate and searched various sources on the internet for information. In the end we found the solution in the following official patches applied to the main WDQS journal file configuration:

https://gerrit.wikimedia.org/r/#/c/wikidata/query/rdf/+/512890/

The corresponding issue description can be found in https://phabricator.wikimedia.org/T213210

It turns out that the BTree configuration in the official WDQS Blazegraph configuration has been adjusted (particularly the BTree branching factors) to avoid allocation limits.

This adjustment is missing in the RWStore.properties bundled in the current docker releases.

We have been able to successfully load the March Wikidata dump by supplying the updated RWStore.properties to our container, basically having the same configuration as in the productive master.

Expected result:

Update the RWStore.properties file in the docker image to allow a successful loading process

Note: the fix needs to be applied to https://github.com/wmde/wikibase-docker/blob/master/wdqs/0.3.10/RWStore.properties (or the variant in another version)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Addshore subscribed.

Tagging with the query service tag to see if the WMF search team have any comments!

I think this applies to a conversation that we had about keeping the RWStore.properties files in the docker images in check this week!

The properties used in production are in puppet. There have been some work to fix some issues in Blazegraph, but not sure what applies. Updating to the same properties and latest version of WDQS might be enough to fix.

We will ensure that the image created as part of https://phabricator.wikimedia.org/T250974 has properties to match those that were in wmf production at the time that wdqs version was used.
I figure it is best to not touch the images that have already been around for some time as such a change may result in breaking people deployments in other ways.

There is a roadmap item this year for wikibase releasing and wdqs will be a part of that.

Gehel triaged this task as Medium priority.Sep 15 2020, 8:04 AM
Addshore claimed this task.

Marking as resolved for now as the newer images certainly match the production properties, and 3.40 is the latest tagged version to try