Introduction

This document lists all changes for the most recent major release (releases with number X.Y) and subsequent minor releases (with numbers X.Y.Z and perhaps further identifiers), including major and important changes and a list of all user-visible modifications. Change History repeats the list of user-visible modifications for this release and includes similar lists for earlier releases.

The release described in the documentation set is 6.6.0.

Release 6.6.0

Release 6.6.0 is a major release with significant new features, including the following:

Database internal format is unchanged from version 6.5.0

This means version 6.5.0 repositories can be directly loaded into version 6.6.0 without upgrading. Note that backing up repositories before loading them into a new version is always recommended. Once a database has been used in a later release, it cannot be used in an earlier release regardless of whether or not the database format is the same. Upgrading is discussed in the Repository Upgrading document.

Release 6.5.0

AllegroGraph 6.5.0 was released on March 4, 2019. Release 6.5.0 is a major release with significant new features, including the following:

Database internal format is changed from version 6.4.6

The database format is changed from time to time. When the format is changed, databases must be upgraded to the new format before they can be used. Upgrading is discussed in the Database Upgrading document. The format in version 6.5.0 is changed from version 6.4.6 and from earlier releases such as 6.4.5, 6.4.4, 6.4.3 and 6.4.2. (The format was previously changed in release 6.4.0.) Therefore it is necessary to upgrade 6.4.6 and earlier databases for them to be used with 6.5.0. Note that backing up repositories before upgrading them to a new version is always recommended. Once a database has been used in a later release, it cannot be used in an earlier release regardless of whether the database format is the same. Upgrading is discussed in the Repository Upgrading document.

Release 6.4.6

Release 6.4.6 is a maintenance release with code fixes and enhancements.

Release 6.4.5

Release 6.4.5 is a maintenance release with code fixes and enhancements.

Release 6.4.4

Release 6.4.4 is a maintenance release with code fixes and enhancements. Most changes relate to Multi-master Replication.

Release 6.4.3

Release 6.4.3 is a maintenance release with code fixes and enhancements. Most changes relate to Multi-master Replication.

Release 6.4.2

Release 6.4.2 is a maintenance release with code fixes and enhancements.

Release 6.4.1

Release 6.4.1 is a maintenance release with code fixes and enhancements.

Release 6.4.0

Release 6.4.0 is a major release with significant new features.

The most important and far-reaching change is support for multi-master replication. AllegroGraph has long supported single-master replication, where several AllegroGraph instances share data in a repository, but only one of them can make changes (adding or deleting triples). The rest then catch up. In multi-master replication, even though one instance is identified as the controlling instance, any instance can add or delete triples, with the remainder catching up with those changes while perhaps making other changes of their own. Single-master replication is still supported and is described in the Replication document. The new multi-master replication facility is described in Multi-master Replication.

Database internal format changed from version 6.3.0

The database format is changed from time to time. When the format is changed, databases must be upgraded to the new format before they can be used. Upgrading is discussed in the Repository Upgrading document. The format in version 6.4.0 is changed from version 6.3.0. (The format was previously changed in release 6.2.0.) Therefore it is necessary to upgrade 6.3.0 and earlier databases for them to be used with 6.4.0. Note that backing up repositories before before upgrading them to a new version is always recommended. Once a database has been used in a later release, it cannot be used in an earlier release regardless of whether the database format is the same.

Programmer notes

These sections note changes which may affect how certain operations or code work compared to earlier releases. These are emphasized here because the changes may be unexpected. The complete list of user-visible changes below also mentions these changes in a shorter format.

6.6.0 Programmer notes

There are no programmer notes for release 6.6.0.

6.5.0 Programmer notes

6.4.6 Programmer notes

Several recent patches to Allegro CL modified the way URIs are handled in Allegro CL. These changes are incompatible with AllegroGraph 6.4.x and should not be applied to a Lisp client intended to be used with those versions of AllegroGraph. The patches are uri/uri.001 (posted in September, 2018) through uri/uri.006 (posted January 16, 2019). If you downloaded these patches, remove them from the uri/ subdirectory of the Allegro CL distribution directory and update your Lisp by executing update.sh/update.exe.

6.4.5 Programmer notes

See the note about URI patches under 6.4.6 Programmer notes above. That note applies to AllegroGraph 6.4.5.

6.4.4 Programmer notes

See the note about URI patches under 6.4.6 Programmer notes above. That note applies to AllegroGraph 6.4.4.

6.4.3 Programmer notes

6.4.2 Programmer notes

6.4.1 Programmer notes

6.4.0 Programmer notes

User visible changes

These sections list changes in the current release and in some earlier releases. See the Change History for a list of changes in all earlier releases.

AllegroGraph 6.6.0

AllegroGraph Server: General Changes

Rfe16197 - Fix "UPI ... is not present in string dictionary" error during import

A rare error could be encountered during import to distributed-triple-stores or remote-triple-stores, indicating that a UPI is not present in the triple-store's string dictionary.

This error has been fixed.

Rfe16127 - Make AllegroGraph's scripting model permissions more strict

Superuser permission is now required to upload, list, view, or delete both sitescripts and reposcripts.

Additionally, reposcripts can no longer be loaded into shared backends.

Rfe16096 - Simplify AllegroGraph script naming.

Scripts no longer support hierarchical naming, in favor of a simple flat namespace. For example, when uploading a script:

Legal:   http://example.com:10035/scripts/sc.cl  
Illegal: http://example.com:10035/scripts/com/app/module/sc.cl 

Rfe16093 - Incoming IP restrictions mechanism for AllegroGraph

New AllowIP configuration directive provides a way to restrict access to AG instance to certain ranges of IP addresses.

Rfe15992 - Add MaximumBackupAge parameter to the agraph.cfg file

One can specify the maximum age in seconds that a backup of the multi-master controlling instance is considered acceptable to use to grow the cluster. See the Instance Settings section of the Multi-master Replication document and also the Top-level directives for multi-master replication clusters section of the Server Configuration and Control document).

Rfe15886, Rfe15470 - UI Improvements to the triple attribute pages.

Merges the 'Define Attribute' and 'Define Static Filter' pages into a single 'Triple Attributes' page that is more streamlined and user friendly. See the Attributes example in the AGWebView documentation.

Bug25833 - Using CorsAllowRegex would break session/backend creation

Setting the CorsAllowRegex directive (see Server Configuration and Control) in your agraph.cfg would cause the creation of dedicated sessions and shared backends to break with a confusing error message in the agraph.log file.

Bug25832 - Only compare CorsAllowOrigin directive against Origin host

Previously, each value specified by a CorsAllowOrigin directive was matched against the full value of the Origin header: scheme, host, and port. Now, each CorsAllowOrigin directive is matched only against the host, per the documentation.

Bug25812 - agtool query --standard-namespaces

If agtool query is given the argument '--standard-namespaces no' then the AllegroGraph set of standard namespace PREFIX definitions will not be prepended to the text of query. Furthermore if the query is going to an AllegroGraph repository that agtool will open itself then the set of namespaces known to AllegroGraph is cleared before the query is run.

Bug25805 - Fix bug in SNA path-finding functions used with remote-triple-stores.

SNA path-finding functions like depth-first-search and all-bidirectional-search-paths would fail when called on a remote-triple-store if either the START or END arguments represented literals. This is now fixed.

Bug25801 - CSV import hangs on surrogate pairs

The CSV importer has been fixed to work with UTF8 surrogate pairs.

Bug25784 - Agtool archive failed when using an https spec.

Trying to use agtool archive with an https spec would fail due to the tool attempting to make regular http requests to the ssl port. This problem is now fixed.

Bug25736 - improved handling of GRAPH in JSON-LD

A JSON-LD error is now signaled when a string which is neither a resource nor URL is passed to as the --graph argument to agtool load. :root is supported as a special value of GRAPH, resulting in using the toplevel subject as a default graph for all triples added for the JSON-LD object with that subject.

Bug25382 - Fix security flaw in AllegroGraph scripting.

Fixes a bug, introduced in v6.3.0, that allowed any file on a filesystem accessible to AllegroGraph to be loaded as a script. Scripts are now only searched for and loaded from their expected locations relative to the SettingsDir directive.

HTTP Client

Bug25820 - CORS does not work via HTTPS

Previously CORS configuration options were ignored for accesses to AllegroGraph made via HTTPS. This has been corrected.

SPARQL

Rfe16157 - Implement logging of slow queries

A new configuration directive SlowQueryLogThreshold, if set, causes SPARQL queries that have total run time in milliseconds greater or equal to the value, to be logged to agraph.log or to a log file specified by SlowQueryLogFile configuration directive.

Bug25831 - Fix optimization of GRAPH with a non-existant value in SPARQL

The query:

select ?s ?p ?o  
{  
  VALUES ?s { <http://s> }  
  VALUES ?p { <http://p> }  
  GRAPH <http://non-existing> {  
OPTIONAL {  
  ?s ?p ?o  
}  
  }  
} 

should return 1 result row with ?s, ?p bound and ?o unbound.

However due to an incorrect optimization of unreachable GRAPH clauses there would be no results. This has been fixed.

Bug25803 - Fix augmenting pattern with two IRI equivalence constraints

SPARQL queries that bind a variable multiple times, like:

SELECT * {  
  BIND (<http://ex/p2> as ?p)  
  {  
BIND (<http://ex/p1> as ?p)  
?s ?p ?o  
  }  
} 

could be optimized incorrectly, leading to the error message:

Executing query failed:  
 nil is not of the expected type `number' 

This has been fixed.

Bug25802 - Join query rewriters lose filters

Certain SPARQL queries where a join happens, and one side contains BIND and FILTER, like:

SELECT ... {  
  ?s ?p1 ?o1  
  {  
    BIND (<http://p2> as ?p2)  
    ?s ?p2 ?o2  
    FILTER (.. ?o2 ..)  
  }  
} 

could be optimized wrongly in that the FILTER would be dropped. This has been fixed.

Bug25794 - BIND variables disappear in join

Certain SPARQL queries where a variable was used in a filter and also projected could return results in which that variable was unbound due to an incorrect query optimization. For example:

SELECT * {  
  {  
    bind (4 as ?four)  
    ?s ?p ?o .  
    filter (?o != ?four)  
  }  
  {  
    bind (3 as ?three)  
    ?s ?p ?o .  
    filter (?o != ?three)  
  }  
} 

could return rows with ?three and ?four unbound. This has been fixed.

Bug25761 - Whitespace symbols are not escaped properly when writing in TSV format

According to the TSV SPARQL standard, when serializing RDF terms some whitespace symbols like tabs, newlines and carriage returns are encoded in strings as \t, \n and \r respectively. This has not been the case, as these symbols were serialized as-is, leading to some parsing problems later, specifically a tab character being treated as separator for TSV format. This has been corrected.

Bug25756 - Unused variable in complex property path gives errors

Queries of the form:

select ?o {  
  ?s ( ^<http://foo> | <http://bar> ) ?o  
} 

in which the property path was not very simple, and also one variable is not otherwise used (here ?s), could lead to an error during execution. This has been fixed.

Bug25752 - Fix missing results for DISTINCT + LIMIT

There could be missing results for queries that uses both DISTINCT and LIMIT due to the DISTINCT condition being applied incorrectly. This has been fixed.

Bug25749 - Filter (str(?var) = '..') marked as impossible

If a SPARQL query had filter pattern comparing a STR() value to a literal string, like:

filter ('http://g' = str(?g)) 

this would result in no results and the warning:

 Warning: `?g` cannot be a literal so the FILTER ?g is one of 1 thing will always fail 

This has been fixed.

Bug25714 - SPARQL IRI() and URI() functions must return valid, absolute results

Previously, the SPARQL IRI() and URI() functions could return IRIs and URIs that were syntactically invalid and/or relative. This has been corrected. AllegroGraph will now signal SPARQL type errors which will be treated as UNBOUND for assignment and as FALSE for FILTER evaluation.

Bug22350 - Fix missing results when using CAAT with DISTINCT

When a SPARQL query containing DISTINCT or REDUCED was executed using the chunk-at-a-time strategy, there could be results missing due to incorrect handling of intermediate query results. This has been fixed.

AGWebView

Rfe16012 - Don't show AllegroGraph Utilities menu unless logged in.

When not logged in, AGWebview displayed the Utilities menu even though none of its menu items work without being logged in. Now, the menu is not presented until a user is logged in.

Changes to the Lisp API

Rfe16071 - Implement breadth-first-search-if functionality

The four breadth-first search SNA functions:

have all been enhanced such that the end argument can be a function of one parameter. If end is such a function, then the search code will call it on each node found during the search and will record a successful search if the function returns true.

Bug25759 - Change load-trix :default-graph argument to :graph

To ensure consistency with other load- functions, :default-graph argument to load-trix has been deprecated and will be removed in the subsequent release. :graph should be used instead.

Bug25738 - AGWebView users are notified when query results may be stale

When reloading queries via the 'Saved' or 'Recent' menus--but also when executing new queries--AGWV will now report when there's a possibility the results displayed are out of date.

Prolog

No changes

Documentation

No changes

AllegroGraph 6.5.0

AllegroGraph Server: General Changes

Rfe15938 - Deprecate --tlog arg to agtool view-tlog

The --tlog argument to agtool view-tlog is deprecated. One need only specify the tlog filename to view.

Rfe15836 - Improve efficiency of dynamic reasoner on rdf:type queries

Increased the speed of the dynamic reasoner when looking for all <SUBJECT rdf:type OBJECT> triples.

Rfe15774 - Make agtools use repo and server specs

All agtool commands are in the process of being modified to use a Repo Spec when referencing a repository and a Server Spec when referencing a server but not a repository. (Repo Specs also identify servers. Server Specs are used when a repository is not relevant to the command, such as with agtool user.) In this realease, the following commands have been modified to accept Repo Specs or Server Specs:

These changes are backward compatible. Previous options are supported but deprecated and may cause warnings to be signaled.

Rfe15748 - Add support for backing up a single remote repository

agtool archive now supports remote repository backup. This operation requires a user with AllegroGraph superuser privileges.

Rfe15745 - Check for no-commit mode before creating a new text index

Creating a new text index requires indexing all existing triples and preparing the new index configuration and datafiles for commit.

Previously creating a new text index on a no-commit repository (such as a warm standby replica) would perform the initial indexing and then fail to commit due to no-commit mode. Now the check for no-commit mode is made early to avoid doing work that will end up being discarded.

Rfe15695 - agtool load now reports the filename with buffer-size exceeded errors.

When the length of a line in an input file exceeds the buffer size an error is reported. Previously this error did not specify which file the error resulted from. This has been changed to report the filename.

Rfe15595 - Add AG directives to choose suppored SSL methods and SSL ciphers

It is now possible to specify SSL protocols and ciphers that will be accepted by AllegroGraph when using HTTPS. This can be achieved by using two new config directives - SSLProtocol and SSLCipherSuites. Configuration directives are described in the Server Configuration and Control document.

Rfe15517 - Change agtool load to use repository specifications

agtool load now accepts a repository specification (REPO_SPEC) argument when specifying a repository. A REPO_SPEC names the repository and also its catalog, and the server scheme, host, port, so all associated arguments which specified those values (--scheme, --host, --port, and --scheme) are deprecated.

Rfe15471 - Support For loading JSON and CSV data in agtool load.

agtool load can now load JSON and CSV files. See the section Loading Raw Data in the Data Import document to learn more about the supported workflows and parameters.

Rfe14214 - Add remote store support to agload

Remote store support has been added to agtool load. It is no longer necessary to run agtool load on the same machine as the AllegroGraph server and as the same user. A username and password must be specified when loading into a remote repository, and that user must have write permission in the repository into which data will be loaded.

Rfe13797 - Reconsider triggering checkpoints on tlog rollover

Automatic checkpoints on tlog rollovers are now disabled.

Rfe10713 - Two phase commit (2PC) support

AllegroGraph can now participate in two phase commit (2PC) operations. See the Two-phase Commit document for details.

Bug25668 - Turtle parser can fail to use same blank node context for all triples in a parse

The turtle parser could fail to unify blank nodes with the same label that appears in RDF lists and outside of those lists. For example, the following data would load with two different nodes instead of one:

prefix : <ex://#>  
:a :p ( _:x1 _:x1 _:x1 ) .  
_:x1 :p 'object' . 

This has been corrected.

Bug25653 - Opening of a repl that should be running

A multi-master replication instance repo will remain open until it is explicitly stopped or for the period of time when the AllegroGraph server is not running. If an instance dies for some reason and a request comes in to open its repo then the repo now will open and rejoin the cluster. Previously an explicit start was required to start the instance and open the repo.

Bug25641 - Unhelpful error message from inability to translate a character

The error message that occurred when a data import was unable to translate a character was unhelpful. This has been corrected.

Bug25596 - RDFS++ reasoner does not follow sameAs for domain or range assertions

The dynamic RDFS++ reasoner was not inferring triples that could be derived from rdfs:domain and rdfs:range statements in addition to owl:sameAs statements. This has been corrected.

Bug25589 - Improve domain and range RDFS++ reasoning when subject not supplied

AllegroGraph's RDFS++ dynamic reasoner was failing to find all rdf:type inferences that used rdfs:range or rdfs:domain when the subject portion was not supplied. This has been corrected.

Bug25588 - Rdfs++ reasoner did not infer range/domain via subProperties

AllegroGraph's dynamic RDFS++ reasoner was not making rdf:type inferences when these required rdfs:domain and rdfs:range reasoning through chains of rdfs:subPropertyOf or owl:inverseOf linkages. This has been corrected.

Bug25586 - Error during recovery of partially-created text index

Previously it was possible for a crash to occur when restarting a repository instance if a partially-created text index existed during at the time of the last checkpoint. This has been fixed.

Bug25578 - xsd:integer casting operator does not work on xsd:longs

The xsd:integer() casting operator was not working on values of type xsd:long. This has been corrected.

Bug25574 - Bidirectional search was inefficient when there is no path

AllegroGraph bidirectional search functions did more work than needed when there was no path to be found between two different nodes. This has been corrected.

Bug25511 - Dynamic restriction reasoner requires subclassing unnecessarily

The dynamic RDFS++ restriction reasoning now recognizes owl:Restrictions that are simple rdfs:subClassOf owl:Restriction and also those that are of rdf:type owl:Restriction.

Bug25496 - agtool upgrade will detect a running repo and exit

agtool upgrade will check if a repo is running and if so print a message that an upgrade is not necessary and then exit with a no-error status of zero. (If a repo can be opened successfully, it does not require upgrading. Once a repo is opened in a version of AllegroGraph later than the version in which is was created, it should not be opened in the earlier version again.)

Bug25390 - Anyone can delete roles

A bug that allowed a user to delete roles without logging in has been fixed.

Bug25353 - Fix various issues when using `agtool export --parallel ...'

Fixes a few issues when exporting in parallel (using --parallel or a --workers argument greater-than 1), and using the default --blank-node-handling strategy of `together'

NQX export could be incomplete due to worker threads incorrectly detecting and skipping triples containing blank-nodes. Now, blank-part detection when exporting NQX works correctly.

Only N-Quads export would check for blank nodes in the graph slot, meaning for other quad formats, some blank nodes would not be properly separated into their own file. Now, NQX, TriX, and TriG formats also check the graph part when saving statements containing blank nodes to a separate file.

Bug25201 - agexport output depends on the value of LANG

It was possible for the value of the LANG environment variable to alter the output of agtool export. This has been corrected.

Bug25114 - Fix printing nquad default graphs

When exporting triples in NQUAD format from a federated or distributed triple store, there could be an unintended "default graph" marker like "default-graph1748246237" after the subject, predicate and object. This has been fixed.

Bug24954 - Fix exporting in NQX format of remote stores

Exporting a remote triple store using "agtool export" in "nqx" format:

agtool export -o nqx --user test:xyzzy ... 

(with both "-o nqx" and a value for "--user")

would result in the error:

http-triple-cursors cannot change whether or not they return  
extended-triples after they have been created. 

This has been fixed.

Bug23424 - Rdfs++ reasoner does not infer subProperties of transitive properties

The dynamic RDFS++ reasoner was failing to infer some triples when they relied on following rdfs:subProperties of owl:transitive properites. This has been corrected.

Bug19476, Bug18483 - restriction reasoning improvements

AllegroGraph's dynamic restriction reasoning was missing some inferences when either the predicate portion of a query was wild or when they required additional rdfs:subClassOf inference on inferred triples. These have both been corrected.

HTTP API

The %D HTTP log directive change

The %D HTTP log directive (meaning response time in microseconds) will now use the high precision clock provided by the operating system rather than the one second resolution clock.

Rfe15876 - Allow specification of Accept-Type in the query parameters

In addition to supporting the normal HTTP Accept-type header, AllegroGraph now also allows an accept parameter to be included in the query portion of an HTTP SPARQL query request. This allows a client to specify the desired content type even when it does not control the headers that it sends. For example, if QUERY is the percent-encoded SPARQL query string, then this sample curl command would return the number of rows that the query produces:

curl "http://REPOSITORY_URL?query=QUERY&accept=text%2finteger"  

Rfe15737 - Add config directive to set HTTP keep-alive timeout

Added a new config directive HTTPKeepAliveTimeout to control the HTTP keep alive timeout. See Server Configuration and Control for information on config directives.

Rfe15731 - Add user-agent header to outgoing HTTP requests

To avoid problems with network proxies that refuse HTTP requests without a User-Agent header, this header is now included in outgoing HTTP requests to remote SPARQL endpoints.

SPARQL

Rfe16032 - Add some list and set handling functions to SPARQL

AllegroGraph now supports three new SPARQL functions:

The first two take a list of arguments and associate then with a variable (gensym). The third looks up an RDF list in the current SPARQL dataset and associates the contents with a variable. In each case, this variable can then be used with other SPARQL magic properties and functions to retrieve and manipulate the list or set.

For example:

select ?member {  
  bind(<http://franz.com/ns/allegrograph/6.5.0/fn#makeSPARQLSet>(1, 2, 4, 1, 2) as ?set)  
  ?member <http://franz.com/ns/allegrograph/4.11/sna/members> ?set .  
} 

Would return 1, 2, and 4.

Rfe16007 - Evaluate the WHERE clause of SPARQL UPDATE queries in REDUCED mode

If a repository contains duplicate triples, then evaluating the WHERE clause of SPARQL update queries could become very memory intensive. Evaluating these in REDUCED mode ameiliorates this problem.

Rfe15967 - Eager filter evaluation could lead to missing query results

If a SPARQL query was supplied parameter values (e.g., via the :with-variables argument to the Lisp API's run-sparql command) and these values produced type-errors, then the FILTER analysis machinery could become confused and produce an incorrect filter. This has been corrected. As an example, the following query and parameters should produce one result but before this bug was fixed, it would produce no results:

select ?target {  
  optional {}  
  FILTER( ! bound(?target) || ! ( isLiteral(?target) && (lang(?target) = 'en')))  
} 

parameters: ((?target . !&lt;ex://test&gt;)). The type-error occurs when the SPARQL lang() function tries to determine that language of the resource !&lt;ex://test&gt;.

Rfe15891 - Provide URI function in SPARQL to parse freetext queries

AllegroGraph now includes a URI function that can be used to see how freetext indexing queries will be parsed. For example:

prefix test: <http://franz.com/ns/allegrograph/6.5.0/>  
select ?query ?expression {  
  values ?query {  
    '"soccer game"'  
    'soccer | fútbol'  
    'socc?r ping* '  
  }  
  bind(test:parseFreetextQuery( ?query ) as ?expression)  
} 

would output:

---------------------------------------------------------------  
| query           | expression                                |  
===============================================================  
| "soccer game"   | (:phrase "soccer game")                   |  
| soccer | fútbol | (:or "soccer " "fútbol")                  |  
| socc?r ping*    | (:and (:match "socc?r") (:match "ping*")) |  
--------------------------------------------------------------- 

which shows how each of the queries would be parsed for use by the fti:match magic property.

Rfe15890 - Enhance fti:match and fti:matchExpression to also bind predicates

AllegroGraph's built in Freetext Index magic properties can now also bind the predicate of any matching triples. For example, a query like:

(?subject ?text ?predicate) fti:match 'sample query' . 

Will search all text indices for matches on "sample" AND "query" and then bind ?subject, ?text, and ?predicate to the columns of each matching triple.

Rfe15717 - Query timeouts should only happen during execution not results output

Previously, AllegroGraph would check for query timeouts both during query execution and during result generation. This meant that a timeout could cause partial results to be sent over HTTP. AllegroGraph now only checks for timeouts while the query is executing which means that either no response will be sent or the entire result set will be sent.

Rfe15693 - Optimize some str(?a) = str(?b) filters

AllegroGraph will now execute queries involving str/str equality and inequality FILTERs where the variables in the calls to str are resources more efficiently. For example, if ?a and ?b are resources or plain literals, then this query will be able to execute without needing to look up the string values in the string dictionary:

SELECT * {  
  :entry :has ?a .  
  :reference :contains ?b .  
  FILTER( str(?a) = str(?b) )  
} 

Rfe15692 - Speed up query planning for queries with only simple BGPs

AllegroGraph now avoids computing estimates for queries that contain only single pattern BGPs. E.g.,

prefix f: <ex:foo#>  
select * {  
  graph ?g { ?s2 f:record ?o }  
  { select ?s2 { ?s2 f:record ?o2 } }  
}  

Rfe15686 - Handle query + filter patterns more efficiently

This change allows the query + filter handling improvements from rfe15628 (implemented in release 6.4.2) to be used more often. In particular, the filter pattern can now be the last pattern in a BGP and the filter pattern can also introduce new bindings.

Rfe15529 - Let run-sparql intern query variables in one package

SPARQL query variables (the third return value from run-sparql) were sometimes located in the query.variables package, and sometimes in the db.agraph.sbqe package. Now they are always in query.variables.

Rfe13652 - Improve performance of some DISTINCT SPARQL sub-queries

AllegroGraph has long evaluated single variable DISTINCT queries using a specialized and more efficient querying technique. This technique did not, however, apply to sub-queries. This meant that these two equivalent queries would perform significantly differently:

# Faster  
SELECT DISTINCT ?p { ?s ?p ?o } 

and

# Slower  
SELECT ?p { { SELECT DISTINCT ?p { ?s ?p ?o } } } 

The query engine logic has been modified so that the two queries will perform similarly.

Rfe10047 - Basic support for date arithmetic in SPARQL

AllegroGraph now supports adding and subtracting xsd:durations from xsd:dates, xsd:times, and xsd:dateTimes. For example:

## Find subjects modified since yesterday  
SELECT * {  
  bind( now() - 'P1D'^^xsd:duration as ?yesterday )  
  ?s :hasDate ?date .  
  FILTER( ?date > ?yesterday )  
} 

AllegroGraph supports adding durations to date/times, adding date/times to durations and subtracting durations from date/times.

Bug25709 - Predicate statistics invalidation is incomplete

The query engine could incorrectly optimize away SPARQL type casting operations. This has been fixed.

Bug25669 - Logical ORs of inequality filters could produce too many solutions

SPARQL FILTERs that logically OR'd multiple inequality constraints together could be incorrectly processed leading to too many solutions. This has been corrected.

Bug25634 - Impossible OPTIONALs can lose solutions in some cases

If a query began with an OPTIONAL clause and that clause found no bindings and the query then required subsequent processing (e.g., via a BIND() clause), then solutions could be lost. This has been corrected.

Bug25564 - SPARQL queries that used constant expressions could fail over HTTP

AllegroGraph v6.4.2 introduced the eager evaluation of constant expressions (like bind(iri('string') as ?value)). This improvement sometimes caused failures when a query plan with these constants was reused because the value of the expression was not being saved by the plan which would lead to UPI is not in string table errors. This has been corrected.

Bug25545 - UUID() and STRUUID() should not be evaluated eagerly

The SPARQL UUID() and STRUUID() functions were being evaluated at plan time rather than query time. This has been corrected.

Bug25501 - Fix bug in t:intervalCotemporal using start and end times

The SPARQL magic property for t:intervalCotemporal worked correctly when using points on the time line (t:startpoint and t:endpoint) but not when using actual times (t:starttime and t:endtime). This has been corrected.

Bug25465 - Constraint analysis could cause queries with SERVICE clauses to fail

AllegroGraph's planning step could fail to process queries with SERVICE clauses that included FILTERs if those FILTERs attempted to query the current repository. This has been corrected.

The problem was introduced in AllegroGraph v6.4.1.

Bug25454 - Problem with SPARQL division by zero

If the operands to a SPARQL divide arithmatic expression were of type xsd:double, then AllegroGraph could incorrectly signal a SPARQL type error if the divisor was 0 instead of returning positive or negative infinity.

Bug25396 - SPARQL parser bug with unnamed aggregate expressions

AllegroGraph v6.4.1 introduced a bug such that the SPARQL parser would fail to parse a GROUP BY expression that did not provide a new variable. For example:

SELECT (count(?s) as ?count) {  
  ?s ?p ?o .  
} GROUP BY str(?o) 

Queries that did introduce a variable like:

SELECT ?foo {  
  ?s ?p ?o .  
} GROUP BY (str(?o) AS ?foo) 

would parse correctly. This has been corrected.

Bug25391 - SPARQL (count(distinct *) ...) can get the wrong answer

It was possible for SPARQL queries using COUNT(DISTINCT *) to produce the wrong answer. This has been corrected.

Bug25352 - Blank nodes from planning and parsing could incorrectly overlap

If a query used both anonymous blank nodes and property paths, then it was possible for the blank node bookkeeping to incorrectly assign identifiers. For example, a query like:

select * {  
  [ a ?Class ] .  
  ?x :a/:b ?c .  
} 

could be parsed as

select * {  
  _:b0 a ?Class .  
  ?x :a _:b0 .  
  _:b0 :b ?c .  
} 

instead of

select * {  
  _:b0 a ?Class .  
  ?x :a _:b1 .  
  _:b1 :b ?c .  
} 

This problem has been corrected.

Bug25342 - Alternation in Property Paths could return incorrect bindings

If a SPARQL query used alternation in a property path, it was possible that AllegroGraph would bind the subject side of the path to the variable on the object side. This has been corrected.

Bug25334 - SPARQL parser's variable classification was too strict

AllegroGraph was signaling an error if a GROUP BY variable was renamed via a SELECT expression. For example, the following valid query would fail to parse

prefix : <http://example.org/>  
SELECT  (?entry AS ?other) (MIN(xsd:date(?date)) AS ?minDate) {  
  ?item a  :InternalProcedure .  
  ?entry (:logicalSuccessor)+ ?entry .  
  ?entry :eventDate ?date  
} GROUP BY ?event 

This has been corrected.

Bug25198 - Variable mismatch for (run-sparql "ask ..") as :alists

There was a mismatch in the return values for:

(run-sparql "ASK .." :results-format :alists) 

as the alist (first value) could be:

((?result . t))  
where the variable names (third value) would be: 

(?found)

Now both use the db.agraph.query.variables::?result symbol.

Bug24650 - Improve SPARQL parser's validation of VALUES clauses

AllegroGraph is now more strict when evaluating VALUES clauses where the number of variables in the clause does not match the size of each row of values.

Bug23066 - XSD casting could fail when used with expressions

If an XSD casting operator was used on the result of an expression, the result could be returned as nil. This has been corrected. For example, the following query used to fail with SPARQL type errors:

select ?value {  
  values (?a ?b) { (1 2) }  
  bind( xsd:double( ?a + ?b ) as ?value )  
} 

Bug22548 - Add page rank centrality to Prolog and SPARQL

AllegroGraph now supports computing page rank centrality via the page-rank-centrality Prolog function and also via a new magic property: (link http://franz.com/ns/allegrograph/4.11/sna/pageRankCentrality).

Bug19805 - Dynamic restriction reasoner could fail to infer some triples

The dynamic restriction reasoner was only inferring rdf:type triples when either the subject or the object (or both) was supplied. It would not make inferences when both sides were wild. This has been corrected. Note that inferring all type triples in a query like:

SELECT ?o ?c { ?o a ?c } 

can be expensive due to the amount of computation required.

AGWebView

Bug25510 - Bug in reposcript handling in AGWebVeiw

Previously if you saved or loaded a reposcript from the Utilities | Scripts page, the page would change to one which does not show reposcripts at all. This has been fixed.

Bug25336 - 'Cancel' button does not work in 'Import RDF from a text area input' form

The 'Cancel' button on the 'Import RDF from a text area' dialog used not to work unless an upload had been started. This has been corrected.

Bug25164 - Show metadata in WebView for Parallel SPARQL queries

Parallel SPARQL queries run in WebView against a federated triple store would not show query metadata in the "Information" tab. Now the tab shows a list of the query metadata for each shard of the federated store.

Changes to the Lisp API

Rfe15933 - Remove variable get-triples-list-limit

The variable *get-triples-list-limit*, if not nil, used to limit the number of triples returned by function get-triples-list. As get-triples-list already takes an explicit limit keyword argument, the variable has been removed.

Rfe15879 - Remove RUN-SPARQL :ENGINE argument, VALID-QUERY-ENGINES documentation

Since there is only one SPARQL engine in the current release, the :engine keyword argument to run-sparql and the operators get-sparql-query-engines and valid-query-engines have been removed.

Rfe15870 - Error when a query returns a cursor and there is no query environment

If run-sparql returns a cursor, then it is imperative that the code using that cursor be wrapped with the with-query-environment macro. The lack of wrapping can lead to hard to diagnose problems.

Rfe15828 - Remove preserve-strings and return-[non-]encoded-triples arguments

The Lisp API has long included a preserve-strings argument to the various functions that add triples to a repository (such as add-triple, load-ntriples, and others). When true, both a string version and an encoded version of triples whose objects were typed literals were added. Similarly, functions that retrieved triples (such as get-triples) included arguments to request either only the encoded version or the non-encoded version of said triples (return-encoded-triples and return-non-encoded-triples respectively). These three arguments have been removed from the API.

Rfe15603 - Improve behavior of db when closing an encapsulated triple store

The behavior of variable db when closing or deleting a triple store was not always intuitive. The new behaviour is that (close-triple-store :db db) only updates the binding of the variable db if it had db as its value before the call.

The new value of db depends on the type of db:

Rfe15282 - Allow warmup of individual index flavors

warmup-triple-store now accepts an indices keyword argument to allow specifying which indices to warm up. When the include-triples is true, indices specifies which indices to warm up. :indices nil or unspecified means warm up all indices.

Bug25553 - optimize-indices on a remote-triple-store ignored the wait-p argument.

In the lisp client, if optimize-indices was called on a remote-triple-store with :wait-p t, a non-True boolean value was passed in the HTTP request generated by the call. As a result, the call would return before the optimization operation had completed.

This is now fixed.

Bug25401 - Fix hanging (get-triples :return-extended-triples t) on remote store

Retrieving triples from a remote-triple-store could indefinitely hang if the number of triples was large (typically tens of thousands). This has been resolved.

Prolog

Bug24993 - Default graph in query results

Prolog queries that return the default graph object in a binding caused an error if CSV, TSV or TTL was used as the output format. Such queries also failed to display results in AGWebView. This has been corrected. Any variable bound to the default graph will be treated as unbound.

Bug22548 - Add page rank centrality to Prolog and SPARQL

AllegroGraph now supports computing page rank centrality via the page-rank-centrality Prolog function and also via a new magic property: (link http://franz.com/ns/allegrograph/4.11/sna/pageRankCentrality).

Documentation

No significant changes.

nD Geospatial

No significant changes.

AllegroGraph 6.4.6

AllegroGraph Server

Bug25699: Restoring upi-string got illegal value during recovery/replication

AllegroGraph 6.4.0 introduced a bug that could result in the following error message during crash recovery or when using replication:

restoring upi-string got illegal value [xxx] 

This could prevent a repository from starting up after a crash. This has been fixed.

Bug25653 - A multi-master repl repo that died will restart the next time it is opened

A multi-master repl instance repo (see Multi-master Replication) will remain open until it is explicitly stopped or for the period of time when the agraph server is not running. If an instance dies for some reason and a request comes in to open its repo then the repo now will open and rejoin the cluster. Previously an explicit start was required to start the instance and open the repo.

AGWebView

Rfe16002 - Move query from URL to body

Previously in AGWebView when running a query or downloading query a result, the query was in placed the request URL. This caused problems with long queries with HTTP proxies that limit the length of URLs. Now the query text is placed in the request body.

AllegroGraph 6.4.5

AllegroGraph Server

Bug25586 - Error during recovery of partially-created text index

Previously it was possible for a crash to occur when restarting a repository instance if a partially-created text index existed during at the time of the last checkpoint. This has been fixed.

SPARQL

Bug25564 - SPARQL queries that used constant expressions could fail over HTTP

AllegroGraph v6.4.2 introduced the eager evaluation of constant expressions (like bind(iri('string') as ?value)). This improvement sometimes caused failures when a query plan with these constants was reused because the value of the expression was not being saved by the plan which would lead to UPI is not in string table errors. This has been corrected.

Bug25545 - Uuid() and STRUUID() should not be evaluated eagerly

The SPARQL UUID() and STRUUID() functions were being evaluated at plan time rather than query time. This has been corrected.

AllegroGraph 6.4.4

AllegroGraph Server: Multi-master replication changes

Rfe15786 - Changes while adding a multi-master replication instance

In earlier releases, when a new MMR instance was added, it could not be removed until the addition completed. This caused problems when the addition took excessive time. Now additions can be removed at any time after they are added. Also, the Replication Cluster Management page in AGWebView would not always display correctly while a MMR instance was being added. That has been fixed.

AllegroGraph 6.4.3

AllegroGraph Server: Multi-master replication changes

Rfe15762 - In repl mgr do timeout for repl/stop http calls

Sending an HTTP request to non-existent machine can sometimes take a long time to timeout. The repl/remove and repl/stop commands for Multi-master Replication now accept a timeout parameter to control how long they wait for the affected host to respond before giving up or moving on.

Rfe15737 - Add config directive to set HTTP keep-alive timeout

The new config directive HTTPKeepAliveTimeout specifies the HTTP keep alive timeout. Configuration directives are described in the Server Configuration and Control document. HTTPKeepAliveTimeout is a top-level directive.

Rfe15712 - Improve replication temporary commit error

When it's not possible to commit at the moment due to replication parameters not being satisfied, an error will be signaled that will not backtrace to agraph.log and that will return a 409 "conflict" error from HTTP.

Bug25397 - Replication restart of two instances at the same time

Previously when two replication instances start up at nearly the same time they can get into a state where they fail to link up. This has been fixed.

Bug25364 - Return x-durability header in commit via HTTP

When an HTTP command results in a commit, "x-durability: missing=N" (where N is the number of of instances that are left to commit to satisfy durability) is supposed to be HTTP response headers but it was not. This has been fixed.

AllegroGraph 6.4.2

AllegroGraph Server: General Changes

Rfe15599 - Disallow creation of repos within the system catalog

Attempts to create repositories in the system catalog will now be met with the following error message:

Repositories cannot be created within the 'system' catalog 

Rfe15528 - Increase speed of finding distinct predicates or graphs in a reasoning triple-store

It is now much more efficient to find distinct predicates or graphs when RDFS++ or restriction reasoning is enabled.

Rfe15492: Use triple-store-spec for certain agtools

The following agtools (see agtool) have had their syntax changed to use a triple-store specification instead of the options --port, --user, --password, --host, and --catalog. The affected tools are: cancel-purge-deleted-triples, define-attribute, delete-static-attribute-filter, get-metadata, lookup-attribute-definition, memory-lock, memory-unlock, purge-deleted-triples, purge-rate-limit, set-purge-rate-limit, set-static-attribute-filter. The triple-store specification is

http(s):[//[USER:PASSWORD@]HOST[:PORT]][/catalogs/CATALOG]/repositories/REPO 

Items in brackets ([]) may be left out in some circumstances depending on what is required for the tool.

Rfe15482 - Change if-exists default for agtool repl create-cluster

In agtool repl create-cluster --if-exists argument used to default to supersede and now defaults to error. Existing scripts using agtool repl create-cluster may now fail to work until --if-exists supersede is added to the argument list.

Rfe15481 - Improve turtle serializer output for numbers

AllegroGraph's Turtle and TriG serializers now emit integers, decimals and double floats using the more concise numeric representation rather than the full XSD typed literal one.

Rfe14740 - agtool can now manipulate users and roles

Added agtool user and agtool role commands to manipulate user accounts and roles respectively. For more infomation, execute:

agtool user --help  
agtool role --help 

See the Managing Users document for further information.

Rfe11183 - Add --optimize option to agtool load

agtool load now accepts the --optimize option to request full (level 2) index optimization after loading completes. See the Data Import document. Index optimization is discussed in the Optimizing indices section of the Triple Indices document.

Bug25289 - Dropping a text index deletes files too early

Dropping a freetext index could result in instance startup errors if the instance crashed before a checkpoint occurred. This has been fixed.

Bug25288: Free Text Index state updates not recorded in tlog during commit

Starting in AllegroGraph v6.3.0, changes in text index configuration (such as creation and removal) were not stored in the transaction log during commit. This could result in disappearance of an added text index, or reappearance of a deleted text index after a repository crash restart. This problem is now fixed.

Bug25266 - sna:egoGroup function does not find its generator in all cases

The functional form of the sna:egoGroup magic property did not look up and register its SNA generator function if the generator was stored using triples. This has been corrected.

Bug25236 - Turtle serializer could emit invalid qnames

It was possible for the Turtle serializer to produce invalid output if resources contained characters that needed to be escaped. This has been corrected.

Bug25207 - Using Japanese tokenizer can result in errors

Using the Japanese text index tokenizer on a system that does not have the mecab package installed would result in an error like the following:

tagger.cpp(153) [load_dictionary_resource(param)] param.cpp(71)  
[ifs] no such file or directory: /etc/mecabrc 

This has been fixed.

Bug25201 - agtool export output depends on the value of LANG

It was possible for the value of the LANG environment variable to alter the output of agtool export. This has been corrected.

Bug25138 - agtool CMD will fail if run from a directory it cannot write to.

If the current working directory is not writable agtool query and agtool materialize would stop running with an error the first time they try to write to their respective log files. Now this behavior has been changed to warn the user that it was unable to write to the log file and then continues processing. It continues logging to the terminal as it would normally do. See agtool General Command Utility for a description of agtool.

Bug25115 - 'agtool export' errors when using --parallel and exporting NQX

Attempting to use agtool export with --output nqx and --parallel mode would result in an error like the following:

error `#<consumer-cursor @ #x1000991a312> does not support extended-triples`  
occurred in worker 11  
interrupting... 

This has been fixed.

HTTP API

Bug25246 - Improve HTTP socket reuse for remote repositories

Queries on remote triple stores now reuse the same underlying HTTP socket connection for efficiency.

SPARQL

Rfe15644 - Improve probing decision

AllegroGraph decides at query time whether it is more efficient to scan or probe to evaluate a triple pattern. However, if a pattern had certain constraints on some of its variables, then AllegroGraph was unable to probe. Now AllegroGraph is able to probe in more cases which can greatly improve performance for particular queries.

Rfe15628 - Handle query + filter patterns more efficiently

AllegroGraph now handles SPARQL queries where a pattern in a BGP can act as a filter on the existing set of solutions. As an example, consider this query:

:target :select ?s .  
?s :has ?property .  
?property rdf:type :animal . 

Prior to this change, AllegroGraph would first find all <?s :has ?property> triples and only then filter the results using the <?property rdf:type :animal> pattern. Depending on the shape of the dataset, this could generate a large number of intermediate results. AllegroGraph is now able to treat the <?property rdf:type :animal> pattern as a filter while evaluating the <?s :has ?property> pattern which can help speed the query.

Rfe15607 - Sort language tagged literals sensibly

The SPARQL 1.1 standard does not define an ordering on language tagged literals. AllegroGraph now orders language tagged literals by first comparing their languages and then their string values. Plain and xsd:string typed literals come before any language tagged literal.

Rfe15600 - Remove and warn about unused BINDings

AllegroGraph now issues a query warning if variables introduced by a BIND clause are not used elsewhere in the query. For example:

select distinct ?o {  
  bind(23 as ?number)  
  ?s ?p ?o .  
}  

Rfe15541 - Warn when a BIND form is extending an empty set of solutions

The SPARQL BIND construct operates by extending an existing set of bindings. If there are no bindings, then there is nothing to extend and so the assignment will uniformly fail. AllegroGraph now warns when it encounters this situation. For example,

SELECT ?ABC {  
  BIND(?s AS ?ABC)  
  ?s ?p ?o .  
} 

Previously, AllegroGraph was incorrectly rearranging the above query so that it would return bindings for ?ABC. Now the above query will leave ?ABC unbound and emit a :warn-empty-bind-clause warning.

Rfe15524 - Improve SPARQL property path efficiency

The data structures used to compute SPARQL property paths have been improved to provide better performance.

Rfe15523 - Improve SPARQL dataset efficiency

SPARQL datasets are now slightly more efficient when processing queries.

Rfe15522 - Use existing constant bindings when evaluating subsequent ones

AllegroGraph now uses existing constant BINDings when evaluating subsequent ones during query planning rather than waiting until query execution.

Rfe15515 - Support variable attributes in SPARQL attributes block

AllegroGraph SPARQL now supports variable attributes for SPARQL update operations. For example, the query:

prefix attr: <http://franz.com/ns/allegrograph/6.2.0/>  
insert {  
  attributes ?attr { ?s ex:newPredicate ?o . }  
} where {  
  ?attr attr:attributes (?s ex:oldPredicate ?o }  
} 

would replace each triple whose predicate was ex:oldPredicate with one having the predicate ex:newPredicate and the same attributes.

Rfe15501 - Make better use of FILTER constraints in property path queries

AllegroGraph now uses constraints derived from SPARQL property path queries in more cases. This can help to improve the performance of some queries.

Rfe15413 - Improve handling of constant BIND expressions

AllegroGraph now analyzes constant expressions in BIND forms and can use the results to improve the efficency of some queries.

For example, AllegroGraph previously would execute only the first of the following two logically equivalent queries efficiently:

# BIND with a constant  
select * {  
  bind( <http://example.com#Mammal> as ?Class )  
  ?a rdf:type ?Class .  
}  
 
# BIND with a constant _expression_  
select * {  
  bind( iri('http://example.com#Mammal') as ?Class )  
  ?a rdf:type ?Class .  
} 

Now both of the queries will execute efficiently.

Rfe15381 - Allow federated geospatial query if one store has no geospatial mappings at all

When executing SPARQL geospatial query on federated-triple-stores an error was thrown if federated stores had different geospatial type mappings. This was an overly strict limitation, so that error is now only thrown when regular type mappings differ.

Bug25271: Fix "agtool query" on SPARQL endpoint

Running a query on a SPARQL endpoint using "agtool query", e.g.

./agtool query http://dbpedia.org/sparql 

would, after printing results, signal the error:

Error "http://dbpedia.org/sparql" is not a triple store occurred during setup 

This has been resolved.

Bug25268 - Correct handling of query log line length

It was previously impossible to set the query log line length using the logQuery query option. The log length can now be set with the new logLineLength query parameter.

Bug25247 - Some SPARQL sub-queries with external filters could fail.

AllegroGraph could fail to correctly execute SPARQL queries when they involved a sub-query and FILTERs that applied to triple-patterns within the sub-query. For example:

select ?s ?timestamp {  
  {  
    select distinct ?s ?timestamp {  
      ?s allegro:hasCreationDate ?timestamp .  
    }  
  }  
  FILTER (?timestamp >= '2018-04-12T20:32:53.213Z'^^xsd:dateTime>)  
  FILTER (?timestamp <= '2018-04-15T20:32:53.213Z'^^xsd:dateTime>)  
} 

This has been corrected.

Bug25170 - Property path analysis of missing constants is too stringent

AllegroGraph was marking some property path queries as if they were impossible when elements of the path were not found in the repository. This led to some queries failing to return results. The problem has been corrected.

Bug25197 - Fix handling 'select *' results from remote endpoints

Queries of the form select * { .. } sent to a non-AllegroGraph endpoint could fail with a "result variables are in wrong order" error even though the query results sent by the endpoint were valid. This has been fixed.

Bug25169 - Impossible NOT EXISTS clauses should not make query impossible

The logic that notices when parts of a SPARQL query cannot succeed and marks them as impossible was incorrectly treating NOT EXISTS filters as if they were EXISTS filters which led to some queries failing to return results. This has been corrected.

Bug25151 - Problem with complex NOT EXISTS filters

Queries that used [NOT] EXISTS in a FILTER could lead to an error if the query inside the [NOT] EXISTS contained language filters.

Bug22482 - Improve property path estimates with fixed subject/object

AllegroGraph now does a much better job of estimating the cost of transitive closure (i.e., zero-or-more and one-or-more) property path queries. These improved estimates can lead to greatly improved plans.

AGWebView

Rfe15410: Add repository name and group columns to the AGWebView cluster table

On the replication manager page in Webview columns were added to display the repository name and catalog as well as the group of each instance. See the Managing Clusters Using AGWebView section for information on the WebView cluster table.

Bug25146: Ok button never reenabled after failed text area load

In AllegroGraph WebView when importing statements from a text area input the OK button didn't reenable after the loading process had failed. This has been corrected.

Changes to the Lisp API

Rfe15547 - Add type checking to the upi function

The upi function now includes type checking so that it will signal a clearer error message if passed an argument of the wrong type. The function is now also defined on UPIs in addition to future-parts.

Rfe15499 - delete-triple improvements

delete-triple now accepts a triple object as argument, as alternative to a triple id.

In either case the return value now indicates whether the deletion was successful.

Rfe15483 - Add part-to-namespace to the Lisp API

The Lisp API now includes part-to-namespace. This function takes a UPI, a future part, or a string representing a URI (with or without angle brackets) and returns the Prefixed Name and Local Part (as multiple values) if a registered namespace can be found to abbreviate the resource. For example:

(part-to-namespace "<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>")  
==>  
"rdf"  
"type"  

Rfe14068 - Let run-sparql return query metadata for remote triple stores

Calling the run-sparql function on a remote triple store now returns query metadata like timing information as fourth value, just as for local triple stores.

Rfe8199 - Add a with-open-triple-store convenience macro

The Lisp API now includes with-open-triple-store macro which opens a triple-store, executes the body, and then closes it.

Bug25305 - Export cursor-peek from db.agraph package

The cursor-peek function was introduced in AllegroGraph v6.4.1 but was not exported from the db.agraph package. The symbol is now exported and also available in the db.agraph.user package.

Bug25192 - materialize-entailed-triples was not supported in the remote Lisp client

Both materialize-entailed-triples and delete-materialized-triples are now available in the remote Lisp client.

Bug25168 - Fix leaked http-cursor finalizer clash

Cursors can be leaked, for example by using return-from inside iterate-cursor. These cursors are eventually garbage-collected. There was a finalizer race condition in the collection of HTTP connection based cursors, that would lead to stream-closed-error being signaled to the user unexpectedly. This has been resolved.

Bug25168 - Improve cursor leak message for get-triples on remote-triple-store

If get-triples is called on a remote-triple-store outside with-query-environment, the cursor will open an HTTP socket to the triple store. If the cursor is leaked it will be garbage-collected eventually, but until that moment the socket will be kept open. This can negatively impact performance, therefore a warning will now be logged:

[2018-03-12T09:06:27.250 p13791 W cursor] Cursor created by  
(get-triples) on remote-triple-store "db" was leaked,  
will be closed. 

Bug25166 - remote-triple-stores reason on the client rather than the server

AllegroGraph now ensures that the dynamic reasoner will execute on the server rather than the client when using a remote-triple-store. This prevents a large number of get-triples from executing via HTTP when using the RDFS++ reasoner.

Prolog

No significant changes.

Documentation

No significant changes.

nD Geospatial

No significant changes.

AllegroGraph 6.4.1

AllegroGraph Server: General Changes

New agtool commands and some changed arguments

The *agtool command-line utility has new commands available. Further some commands have new arguments and some arguments have changed. See the agtool General Command Utility document for details. Most commands now have a --scheme argument which can be http or https.

agtool repl create-cluster adds --if-exists and --force arguments

agtool repl create-cluster previously would only create new, empty repositories and if an existing repository were specified, it would be deleted and a new, empty repository with the same name would be created. (This behavior differed from the behavior when creating clusters with AGWebView, where a repository had to exist and need not be empty when it was converted to an initial replication instance.) Now agtool repl create-cluster accepts an --if-exists argument with allowable values supersede (the default, meaning delete the existing repository and create a new one with the same name), overwrite (same as supersede), use (convert an existing, possibly non-empty repository), and error (signal an error if the repository specified already exists).

If use is specified, then any encoded id definitions will be examined and if any do not allow for 2^60 distinct strings and so will not work with next-encoded-upi-for-prefix, the conversion will fail and a warning will be printed. If the --force argument with value true is supplied, then the conversion will be done but none of the offending encoded id prefixes must be used again.

The Cluster Replication Manager page now displays statistics

These help users to monitor the state of the cluster. See the Managing clusters in AGWebView once created section in the Multi-master Replication document.

When adding a cluster instance in AGWebView, a progress log is displayed

When adding an instance in Webview you'll see that the log of actions is updated with progress reports describing what is being done. Also the AGWebView replication manager page has new columns and some columns have been renamed. See here for information on using AGWebView to manage clusters.

Rfe15465 - Disallow setting bulk-load-mode in replication instance

In a replication instance one cannot set bulk load mode since replication depends on the transaction logs being an accurate reflection of the changes to the repository and logging is disabled in bulk loading mode. Specifying the --bulk option to agtool load or clicking the Use bulk load mode checkbox when adding triples from an uploaded file in AGWebView will cause the load to fail.

Rfe15451 - Don't fail if unable to write to agload.log

If the current working directory is not writable agtool load would stop running with an error the first time it tries to write to the log file agload.log. Now this behavior has been changed to warn the user that it was unable to write to the log file and then continues processing. It continues logging to the terminal as it would normally do.

Rfe15426 - Expose and document the --parameter option for agtool load

agtool load now accepts the --parameter option for controlling the configuration of newly created repositories. See the --parameter option in the Data Import document for details.

Rfe15418 - Change StringTableCompression default to 'none'

AllegroGraph now in the default creates new repositories with string compression disabled. This results in faster out-of-the-box operation. String compression can be enabled by using the StringTableCompression directive in agraph.cfg. See the description of StringTableCompress in the Server Configuration and Control document for information.

Note that the string compression type can only been set when creating a new repository. The StringTableCompression parameter is further discussed here in the Performance Tuning document.

Rfe15190 - Remove --repl argument from agtool archive backup and agtool recover

The --repl argument for agtool archive backup and agtool recover is no longer present because it is no longer needed (whether or not a repository is a replication repository is now automatically determined).

Rfe14770 - Error message from agload loses most of the detail

When using agtool load the error messages signaled while loading triples were truncated. This is now corrected.

Rfe14389: AllegroGraph no longer supports Callimachus

AllegroGraph no longer supports Callimachus. Stores that were previously set up to integrate with Callimachus will open normally but they will no longer execute the Callimachus integration code.

Bug25087 - TempDir is not being used for placing temporary query files

Temporary query files were being placed in the repository's directory rather than in the location specified by the TempDir configuration parameter. This has been corrected.

Bug25075 - Bidirectional search can return bad paths

If there were many possible overlapping bidirectional paths between two nodes, AllegroGraph could return incorrect paths. This has been corrected.

Bug25102 - Subscript UPIs did not print correctly.

AllegroGraph was printing the prefix of a subscript UPIs twice. This has been corrected. Previously, they would print as

<http://franz.com/ns/allegrograph/4.14/index#_http://franz.com/ns/allegrograph/4.14/index#_4> 

Now they print as

<http://franz.com/ns/allegrograph/4.14/index#_4>  

Bug25062 - Fix uninformative error when running agraph-control as root.

When running agraph-control as root when there was no RunAs directive in agraph.cfg would result in the following uninformative error:

Got error while executing plan: `nil' is not of the expected type  
`(array character (*))' for foreign type `(* :char)' 

Now the error messages generated for no RunAs user and non-existent RunAs user, respectively, are:

# bin/agraph-control --config lib/agraph.cfg start  
Running AllegroGraph as superuser is not recommended for security reasons.  
It is recommended that another less privileged user be used, specified  
via the `RunAs' directive in agraph.cfg.  
 
# bin/agraph-control --config lib/agraph.cfg start  
RunAs user `UserThatDoesNotExist' does not exist in the passwd database.  
 
Please run the AllegroGraph configuration script or adjust the `RunAs'  
directive in lib/agraph.cfg  
 

HTTP API

Rfe15418 - Allow specifying string table compression method

Added a stringTableCompression parameter to the repository creation HTTP service.

SPARQL

Rfe15421 - Add control over duplicate triple reduction in SPARQL queries

AllegroGraph now has a new query option: enableDuplicateReduction which controls whether or not the SPARQL engine reduces the number of duplicate triples it processes. See SPARQL Query Options in the SPARQL Reference document.

If the store has no duplicate triples (based on subject, predicate, object, and graph) then this option has no effect.

SPARQL is defined on sets of triples (i.e., no duplicates) but AllegroGraph can store duplicates which can lead to duplicate rows of bindings returned by a query.

If this option is set to true, then AllegroGraph will ignore consecutive duplicate triples returned from the storage layer. Since the storage layer makes no guarentees on the order of triples it returns, this can lead to different results from the same query.

Note: Previous versions of AllegroGraph used duplicate reduction by default. This version turns if off by default. If your triple-store has duplicate triples, then this may change the results of your queries.

Rfe15419 - Include query modifiers when printing a SPARQL query plan

AllegroGraph now includes query modifiers like ORDER BY or LIMIT when it prints a query plan.

Rfe15391 - Warn when the variable HOST of a SERVICE clause is not bound

AllegroGraph now warns when the HOST variable of a SERVICE clause is unbound in the query.

For example, both of these queries will produce query warnings:

# Query 1  
select * {  
 {  
   :myService :isAtURL ?url  
 } union {  
   service ?url { ?s ?p ?o }  
 }  
}  
 
# Query 2  
select * { service ?unknown { ?s ?p ?o } } 

Rfe15354 - Improve handling of queries containing GRAPH and JOIN clauses

AllegroGraph will now handle queries involving GRAPH and JOIN clauses more efficiently.

Rfe15336 - Sanity check on JSON/XML data returned by SPARQL endpoint

If a SPARQL query includes a SERVICE call, the XML and JSON result data is now subject to more syntactic and semantic error checking. Nevertheless invalid result data from third parties might still lead to unexpected outcomes.

Rfe15273 - Add Javascript API for defining SPARQL extensions

AllegroGraph's server side Javascript engine now supports the following:

For details, see the Javascript documentation.

Bug25145 - Illegal keyword error when executing some queries

AllegroGraph could signal an Illegal Keyword error when executing some complex queries. This has been corrected.

Bug25113: SPARQL planner stopped optimizing certain queries

If a query has a FILTER like

FILTER( ?var1 = ?var2 ) 

and it can be determined that both ?var1 and ?var2 are resources, then AllegroGraph can perform certain query optimizations. This feature was inadvertently broken in AllegroGraph 6.4 and has now been reinstated.

Bug25097 - Graph not in dataset warning signaled inappropriately

AllegroGraph v6.3.0 and following signal a query warning if the graph in a GRAPH clause is not in the dataset as in, for example, this query:

select *  
from named <http://example.com#graph> {  
  graph <http://example.org#otherGraph> { ?s ?p ?o }  
} 

AllegroGraph was signaling this warning more often than necessary. This has been corrected.

Bug25064 - GROUP BY expressions in a SUB-QUERY causes an error

AllegroGraph was signaling an error if a SPARQL query used GROUP BY expressions in a SUB-QUERY. This has been corrected. An example query that used to fail would be

select * {  
  { select ?strWho (sum(?amount) as ?sum) {  
      ?who ?p ?amount .  
    } group by (str(?who) as ?strWho)  
  }  
}  

Bug25057 - Values and OPTIONAL could lead to too many results

If a SPARQL query used a VALUES form inside the query and the VALUES form had only a single variable and a single binding for that variable and the query also used an OPTIONAL form that made use of the same variable, then AllegroGraph could return results with the variable unbound. This has been corrected.

As an example, AllegroGraph previously could have returned results with ?o2 unbound for the following query:

SELECT ?s ?o1 ?o2 {  
  ?s ?p1 ?o1  
  OPTIONAL { ?s foaf:knows ?o2 }  
  VALUES (?o2) { (:b) }  
} 

Bug25055 - Improve SPARQL parser error message for bad aggregation expression

AllegroGraph was signaling an error for bad aggregation expressions rather than indicating that the query failed to parse. For example, this query is invalid because it is illegal to GROUP BY an aggreagate:

select (sum(?o) as ?sum) (sample(?s) as ?ss) {  
  ?s ?p ?o .  
} group by (sum(?o) as ?xxx) having (?xxx > 2) 

AllegroGraph now signals a SPARQL parser error for queries like this.

Bug25034 - Catch additional SPARQL parse errors

SPARQL is defined such that repeated variables in the projection are ignored. Previously, AllegroGraph would include each repeated variable. Now, it will include only the first instance and will warn if the list includes repetition.

For example, this query:

SELECT ?s ?g ?s { graph ?g { ?s ?p ?o } } 

Will project only ?s and ?g and will warn that "The following variable is projected multiple times: ?s. Only the first projection will be included".

The variables in expressions and aggregation specifications may not overlap with other projected variables. AllegroGraph now catches errors like:

SELECT ?o (str(?o) as ?o) {  
  ?s ?p ?o .  
} 

or

SELECT ?s (count(1) as ?s) {  
  ?s ?p ?o .  
} GROUP BY ?s 

Previously, the above queries would have passed the parser.

AGWebView

Rfe15395 - Highlight all instances of the token under cursor in the query editor

AGWebView's SPARQL query editor now highlights any tokens that match the one currently under the cursor. This makes it easier to ensure that variable names are not mistyped.

Changes to the Lisp API

rfe15430 Use of next-encoded-upi-for-prefix in multi-master cluster instances

In order to use next-encoded-upi-for-prefix when the repository is a multi-master cluster instance, the template associated with the encoded id prefix must generate exactly 2^60 distinct strings. If it does not, the call to next-encoded-upi-for-prefix will signal an error. As noted just below, the "plain" will work as a template. See register-encoded-id-prefix.

Rfe15466 - Plain format encoded ids

register-encoded-id-prefix will treat the format argument of "plain" (a string) in this special way: The encoded id (the string after the @@) is a variable length integer in the range from 0 to (2^60 -1), much like blank nodes. This is a template suitable for use in multi-master cluster instances. See the Encoded IDs document.

rfe15430 Use of next-encoded-upi-for-prefix in multi-master cluster instances

In order to use next-encoded-upi-for-prefix when the repository is a multi-master cluster instance, the template associated with the encoded id prefix must generate exactly 2^60 distinct strings. If it does not, the call to next-encoded-upi-for-prefix will signal an error. As noted just above, the "plain" will work as a template. See register-encoded-id-prefix.

Rfe15379 - Remove in-line-data argument from the run-sparql

The in-line-data argument to run-sparql is no longer supported. If you need to execute the same basic query with different sets of BINDINGS, then use the VALUES form in your SPARQL query string.

Rfe15373 - Export peekable-cursors

The Lisp API now includes these new functions:

A peekable-cursor is like a regular cursor except cursor-peek can be used to see what cursor-next-row will return without modifying the state of the cursor. See the documentation for details.

Bug25119 - load-turtle not accepting a :base-uri arg in remote lisp client

The remote lisp client did not support the base-uri argument to load-turtle. This has been corrected.

Bug25070 - upi->value uses db when decoded encoded IDs

The upi->value function was using db to decode encoded IDs even when a specific value for db was passed into the function. This has been corrected.

Bug25043 - get-triples-nd-* functions were incompletely documented

The various nD get-triples functions (like get-triples-nd-within-bounding-box) return :part-not-found as a second return value if it can be determined that one of the search parameters is definitely not in the repository. This is now documented.

Bug23635: Make Lisp client :default-graph-uris keyword work with remote-triple-stores

SPARQL queries made against remote-triple-stores via run-sparql, that passed the :default-graph-uris keyword argument, would not return expected results. This has now been fixed.

Prolog

No significant changes.

Documentation

No significant changes.

nD Geospatial

Rfe13347 - Automatic nD datatype mapping is now on for new repositories

AllegroGraph now creates new repositories with automatic N-dimensional (nD) datatype mapping enabled. This means that adding triples with nD objects will add the necessary type mapping with no further intervention. See nD Geospatial Automation for details and a linke to further discussion in the geospatial examples document.

Bug25129: Bus error on geospatial search with a non-existing predicate

The bus error on the server happened when trying to obtain triples from polygon using predicate that was not previously added to the store.

Behaviour for obtaining triples from polygons was modified to properly handle this case.

AllegroGraph 6.4.0

AllegroGraph Server: General Changes

Rfe15302 - Remove support for using rapper as an external parser

The use-rapper argument to the AllegroGraph data import commands has been removed because AllegroGraph now supports all of the standard formats.

The rapper command line argument to agtool load has similarly been removed.

Rfe15219 - Add timeout and limit arguments to the SNA path-finding functions

The SNA path finding functions now have a timeout argument and a limit argument. The first specifies the number of seconds to execute the search whereas the second indicates that searching should stop once that many paths have been found.

The SNA path functions will return (as a second value) the status of the search. This will be either nil if the search was not interrupted, :timeout if the search reached the timeout, or :limit-reached if the limit on the number of paths was reached.

Note that the return format for the REST API to the SNA path functions is now versioned. The desired version if specified via a version parameter in the query string. If the version is 1, then the previous result format of a list of lists representing paths will be returned. Otherwise, the new format will be used. The new format consists of a JSON object with two keys: "paths" and "status". "paths" contains the list of paths and "status" contains the reason that the search completed. It will be one of "complete", "timeout", or "limit-reached".

Bug24980 - Turtle serializer escapes the PNAME_NS incorrectly

The Turtle serializer was escaping both the namespace portion and the local portion of a qualified name using the same logic. This was incorrect as the escaping for the two differ. The problem has been corrected.

HTTP API

No significant changes.

SPARQL

Rfe15337 - Have the NOW() SPARQL function include a timezone

The SPARQL NOW() function now returns dateTimes in GMT. Previously, the dateTimes had no explicit timezone.

Rfe15259 - Add a query option to limit the size of query log entries

AllegroGraph's SPARQL engine now truncates query log message to 512 characters by default. This limit can be changed by adding ":LINE_LENGTH" to the logQuery query option either in the AllegroGraph configuration file or on a per-query basis. For example, this PREFIX line will limit log lines to 100-characters:

PREFIX franzOption_logQuery: <franz:yes:100> 

Rfe15258 - Add maximumValuesCountForService query option

AllegroGraph uses the SPARQL VALUES clause to pass partial results to SPARQL endpoints. In general this can help the endpoint compute its results more efficiently but when there are many values the cost of transmitting the data can outweigh these benefits.

The maximumValuesCountForService provides a mechanism to limit the total number of VALUES sent.

Rfe15250 - Improve treatment of very large VALUES clauses

The query planner now handles large VALUES clauses significantly faster. In addition, the query executor now decides whether to probe or scan based on the number of VALUES and the expected number of rows that a cursor will need to traverse. These two changes can make some queries significantly faster.

Rfe11137: Support the TIMEZONE() and TZ() functions

AllegroGraph now supports the SPARQL 1.1. TIMEZONE() and TZ() functions.

Bug25003 - FILTERing on an expression like ( ! ?a = ?b ) caused an error

The above expression evaluates as (!?a) = ?b and AllegroGraph was not correctly handling the expression of the inner negation operator. This has been corrected.

Bug24985 - FILTER EXISTS and SUB-QUERY can lose solutions

If a FILTER EXISTS clause started with a sub-query then AllegroGraph could fail to find some solutions. This has been corrected.

Bug24657 - GRAPH filter can be applied to the wrong clause

If a graph variable appeared in the subject, predicate, or object position of a triple-pattern, it was possible for AllegroGraph to apply a GRAPH dataset constraint to it incorrectly. For example, AllegroGraph could have incorrectly determined that the ?g1 :predicate1 ?object pattern in the query below should be evaluated as if it was inside a GRAPH clause which could lead to incorrect results.

select * {  
  GRAPH ?g1 { ?s1 ?p1 ?o1 } .  
  GRAPH ?g2 { ?s2 ?p2 ?o1 } .  
  ?g1 :predicate1 ?object .  
} 

This has been corrected.

Bug24151 - Correct a SPARQL FILTER analysis issue

AllegroGraph's SPARQL engine would signal an error if a FILTER contained an expression like

str( ?varOne ) = ?varTwo 

This has been corrected.

Bug20593 - Support the SPARQL 1.1 BNODE( identifier ) function

AllegroGraph has long supported the BNODE() function with no arguments. It now also supports the version that takes a single plain literal or XSD string argument.

Bug24076 - Improve handling of DBPedia.org and other Virtuoso servers as SPARQL endpoints.

AllegroGraph works around an apparent problem with Virtuoso.

AGWebView

Rfe11480 - Added Shutdown instance operation to Repository Control section in AGWebView

See the desription of the repository page in the WebView document.

Bug24949 - Overview page broken for remote sessions

Opening a session to a single, remote store in WebView used to produce the following error message:

Loading failed: Service not supported in a session that does not wrap a single local store.

instead of the overview page. This has been corrected.

Bug24929 - Help messages appear out of view.

Help messages were often shown at the top of the Webview page, out of sight of the current page location. They will now be displayed in tooltips.

Changes to the Lisp API

Rfe15325: Make *db* a required thread binding

To help avoid accidental sharing of a repository connection between threads, each new thread will start with *db* bound to nil. Previously, *db* would retain its global value in new threads.

Given this sample code:

(open-triple-store "test") ;; sets global value of *db*  
 
(mp:process-run-function "new thread"  
   (lambda ()  
     ;; The new thread wants its own connection to the repository  
     (open-triple-store "test"))) 

Prior to v6.4.0, the call to open-triple-store in "new thread" would overwrite the global value of *db*. In v6.4.0, "new thread" will have its own binding of *db* and the global value will not be affected.

Prolog

No significant changes.

Documentation

No significant changes.

nD Geospatial

No significant changes.

User-visible changes in earlier releases

See Change History for user-visible changes to earlier releases.