Clone Tools
  • last updated a few minutes ago
Constraints: committers
Constraints: files
Constraints: dates
MODE-2528 Integrates the new relational provider with the modeshape codebase This is a huge commit which makes the necessary changes to remove all Infinispan configuration and dependencies, replacing it with the new mechanism. It also contains several changes to the relational provider design because of various failing tests. This includes among other thing the necessity for ModeShape to notify the provider once exclusive locks have been obtained as part of each transaction.

  1. … 305 more files in changeset.
MODE-2524 Removes deprecated API

  1. … 16 more files in changeset.
MODE-2109 Changes the large collections node types to mixins and adds additional changes based on the code review

  1. … 20 more files in changeset.
MODE-2109 Updates some unit tests which fail whenever built-in node types are added.

  1. … 5 more files in changeset.
MODE-1671 Added 'mode:id' pseudocolumn for JCR-SQL2 queries

It is now possible to use the 'mode:id' pseudocolumn that exists on all selectors

to obtain the javax.jcr.Node.getIdentifier() value. It can be used in WHERE constraints

and JOIN criteria.

  1. … 18 more files in changeset.
MODE-2097, MODE-2169, MODE-2197 Integrated the latest version of the jboss-integration BOM. This commit includes changes for multiple different issues that snowballed: - packaging Javadocs in a zip - updating Apache POI In addition, after integrating the BOM a number of unit tests had to be updated to reflect changes in dependencies both from a functionality perspective and from a deprecation perspective. The most significant change there was the rewriting of the ConnectorTestCase (modeshape-jca) because the new versions of Arquillian + IronJacamar hold filelocks on Windows:

  1. … 93 more files in changeset.
Correct Java compiler warnings

    • -10
    • +6
  1. … 4 more files in changeset.
MODE-2125 Fixed data type conversions for the local JDBC driver.

    • -120
    • +23
    • -227
    • +2
  1. … 10 more files in changeset.
MODE-2125 Fixed data type conversions for the local JDBC driver.

    • -120
    • +23
    • -227
    • +2
  1. … 10 more files in changeset.
MODE-2188 Added management of index providers and index definitions

ModeShape now can manage index providers and index definitions via a programmatic API

that allows registering new/updated providers and adding/updating/removing index definitions.

Index definitions are stored as nodes in the system area using a structure such as


Changes on one process in the cluster will be persisted to the cace store, and events

on all processes in the cluster will signal a refreshing of a snapshot of the index

definitions used by the query system. Additionally, when changes are made to

an index definition, the provider that owns that definition will be notified of the

new/changed or removed index definition.

Index provider information is not stored in the system area, but rather is used to

instantiate the providers in the same way as sequencers and connectors. Thus,

the repository configuration for each process in the cluster needs to define the

index providers; no information is shared across processes. Notice that all process-specific

information about indexes must be defined on the provider. For example, a notional

provider that stores indexes on the file system would likely require as a configuration

setting the directory in which those files are stored, and this could vary in each

process' configuration. BTW, this maintains ModeShape's convention of using the same

repository configuration file on each process in the cluster, albeit with variables

for any configuration parameters that must vary for the different processes.

Every index definition explicitly states the name of the provider that owns it.

If there is no such provider, ModeShape will mark the index definition as 'disabled'

and it will not be used on that process.

At this time it is not yet possible to define index providers or index definitions

in the repository configuration JSON file or the Wildfly subsystem. This will be

done with a future commit.

However, it is possible with this commit to programmatically register a provider

and define multiple indexes. Testing will also be done in a future commit as a

practical and usable provider is available.

The package and most of the interfaces in the index SPI introduced in 4.0.0.Alpha1

(e.g., formerly 'org.modeshape.jcr.spi.query') were renamed to be shorter and

more appropriate for their current & planned scope. For example, the "QueryIndexProvider"

interface is now simply "IndexProvider".

  1. … 72 more files in changeset.
MODE-2184 Added a public 'close' method to QueryResult public API.

    • -0
    • +5
  1. … 3 more files in changeset.
MODE-2018 Implemented new query engine.

Refactored the query functionality to now use several new service provider interfaces (SPI),

and implemented a new query engine that can take advantage of administrator-defined indexes.

When no such indexes are defined, the query engine is able to still answer the queries

by "scanning" all nodes in the repository. This is like a regular relational database:

all query functionality works (albeith slowly) even when no indexes are defined, though

to improve performance simply define an appropriate index based upon the query or queries

that are being used.

All of ModeShape's query parsing, planning, and optimization steps are basically unchanged

from the previous query system. There is one addition to the rule-based optimizer: a new

rule looks at query plans and adds the potential indexes that might be of use in each

access query portion of a query plan. Then, the query execution process (see below)

chooses one of the identified indexes based upon the selectivity and cardinality. If no index

is available for that portion of the query plan, then the query engine simply iterates

over all queryable nodes in the repository.

A new kind of component, called a "query index provider", allows the query engine to delegate

various responsibilities around indexes to these providers. For example, a provider must

provide an index planner that can examine the constraints that apply to an access query

and determine if any of the provider's indexes can be used. When they are, ModeShape

adds those indexes to the query plan. If the query engine uses one of those indexes,

then provider must be able to return all of those nodes that satisfy the criteria

as described earlier by its index planner. Finally, as ModeShape content changes, ModeShape

will notify the index providers' of the changes so that they can ensure their indexes

are kept up-to-date with the content.

This means that a provider can implement the functionality using any kind of technology,

and consequently, that ModeShape can begin to leverage multiple kinds of search and index

technology within its query system. The ModeShape community anticipates having providers

that use Lucene, Solr, and ElasticSearch. ModeShape will also likely come with a provider

that maintains file-system based indexes. Additionally, providers can optionally support

indexes on one or more properties. Thus, it will be possible to mix and match

these providers, selecting the best technology for the specific kind of index.

The new query engine does the execution in a very different way than the previous engine,

which used Lucene to determine the tuples (that is, the values in each row) for each access

query and that were then further processed and combined to form the tuples that were returned

in the result set. The new engine instead uses a new concept of a "stream of node keys"

for each access query: what actually implements that stream depends on many factors.

A node sequence is an abstraction of a stream of "rows" containing one or more node keys.

The interfaces are designed to make it possibly to lazily implement a stream in a very

efficient manner. Specifically, a node stream is actually comprised of multiple "batches"

of rows, and batches can be of any size.

Consider when the engine findes no indexes are available for a certain access query. The

engine simply uses a "node sequence" (or NodeSequence) implementation that returns in batches

a row for each node in the repository.

But if an access query involves a criteria on the path of a node, such as

"... WHERE ISSAMENODE('/foo/bar') ...", then ModeShape knows that this query (or portion of

a query) will have only one result, namely the node at "/foo/bar". ModeShape doesn't need

an index to quickly find this node; it merely has to navigate to that path to find the one

node that satisfies this query. ModeShape has several other optimizations, too: it knows

when a query involves all children or descendants of a node at a given path, and can take

this into account when optimizing and executing the query. All of these are handled with

special NodeSequence implementations optimized for each case.

For many access queries (i.e., part of a larger query), the engine will use one of the

indexes identified by one of the providers. When this happens, ModeShape uses other

NodeSequence implementations that utilize the underlying indexes to find the nodes that satisfy

some of the criteria.

The above describes how the engine uses a single NodeSequence instance for each each access

query in a larger query. But how does the engine combine these to determine the ultimate

query results? Basically, the engine constructs a series of functions that process one or more

NodeSequence instances to filter and combine into other NodeSequences.

For example, a custom index might be used to find all nodes that have a 'jcr:lastModified'

timestamp within some range. Presumably this index is used because it has a higher selectivity,

meaning that it will filter out more nodes and return fewer nodes than other indexes.

Other criteria that are also applied to this access query might then be applied by a filter

that processes the actual nodes' property values.

While the result of this commit is a functioning query engine that is shown to work in most

of the query-related unit and integration tests, there still are a few areas that are not complete.


* The new engine does not support full-text search, and currently throws an exception

* No index providers are implemented. Therefore, all queries involve "scanning" the repository.

This can be time consuming, especially for federated repositories. Consequently, all such

tests that query federated content have been disabled/ignored.

    • -0
    • +5
  1. … 231 more files in changeset.
MODE-2148 Added checkstyle to our build, and corrected numerous potential problems or issues in the code. Also removed lots of meaningless JavaDoc

  1. … 357 more files in changeset.
MODE-2041 Corrected numerous compiler warninings, JavaDoc errors and warnings, and removed quite a few JavaDoc comments that are inherited via @Override.

  1. … 79 more files in changeset.
MODE-2081 Changed the license for ModeShape code to ASL 2.0.

    • -18
    • +10
  1. … 545 more files in changeset.
MODE-2125 Implemented additional methods in DatabaseMetaData implementation

Teiid requires us to implement several more methods in our DatabaseMetaData

implementation, so that was done. Also fixed a bug in the getColumns(...)

method that expected the column name pattern parameter to be null, when null

should be allowed.

  1. … 2 more files in changeset.
MODE-1920: Add mode:accessControllable to result set

Corrected compiler warnings and removed unnecessary JavaDoc

  1. … 20 more files in changeset.
MODE-1901 Added support for obtaining the query plan without executing the query

There is a new 'explain' method in the ModeShape public query API that returns the internal

query plan for a given statement and language. This same functionality

is also exposed in the JDBC driver (as a custom method) and the RESTful

API (v2).

  1. … 23 more files in changeset.
MODE-1888 Added warnings to queries

The ModeShape-specific query API not includes warnings on QueryResult objects. ModeShape will include warnings in a number of cases, including when column names are misspelled (via common patterns), or when columns is a better match with a different selector.

Several new test cases were added to verify the behavior.

    • -0
    • +7
  1. … 9 more files in changeset.
MODE-1763 - Updated Infinispan XML schema to 5.2 and logging to turn off useless INFO messages.

  1. … 39 more files in changeset.
MODE-1763, MODE-1304 - Updated the ISPN dependency to 5.2.1 and Hibernate Search/Lucene to 4.2/3.6.

Because the new version of Infinispan does not allow by default duplicate MBeans with the same name, the tests had to be updated to specifically turn this option on for each used caches.

  1. … 36 more files in changeset.
MODE-1755 Implemented 'getPlan' in other implementation classes

    • -23
    • +28
  1. … 1 more file in changeset.
MODE-1733 Eliminated in the tests only the excess Hibernate Search startup log messages

These messages were extremely prolific, since a new message was output once each time a

repository was started. This change only removes them from our build and test output.

  1. … 20 more files in changeset.
MODE-1716 - Renamed nodes & properties as per review

  1. … 12 more files in changeset.
MODE-1716 - Implemented persistence mechanism which allows projection - federated node mappings to be stored and retrieved from the system area.

  1. … 17 more files in changeset.
MODE-1563 - Added mechanism for executing repository initialization operations only once (the first startup of an empty repository) and moved the initial content import into that section. In addition, had to correct all the tests which make assumptions about the/ jcr:system content.

  1. … 12 more files in changeset.
MODE-1461 Corrected JavaDoc of 1.7-related JDBC methods are valid when compiled with 1.6.

The previous JavaDoc used {@inheritDoc} JavaDoc annotation to link to the interfaces in the JDBC API. However,

when building with JDK 1.6, these methods are not available. So the JavaDoc was changed to something that should

be valid in 1.6 and 1.7, and added a TODO to add the @Override when we move to 1.7.

  1. … 5 more files in changeset.
MODE-1461 General JDK7 compile compatibility

Needed extension of the JDBC impl:

JcrMetaData.getPseudoColumns - returns empty set

JcrMetaData.generatedKeyAlwaysReturned - returns true

JcrConnection.setSchema - noop

JcrConnection.getSchema - noop

JcrConnection.abort(...) - noop

JcrConnection.setNetworkTimeout - noop

JcrConnection.getNetworkTimeout - return always 0

JcrStatement.closeOnCompletion - noop

JcrStatement.isCloseOnCompletion - return true

JcrResultSet.getObject(int columnIndex, Class<T> type) - throws unsupported

JcrResultSet.getObject(String columnLabel, Class<T> type) - throws unsupported

LocalJcrDriver.getParentLogger - throws unsupported (ModeShape Logger API needs to be extended for that)

  1. … 7 more files in changeset.
Corrected compiler and JavaDoc warnings.

  1. … 23 more files in changeset.