modeshape-jcr-api

Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
JcrTools authorization fix

- Patch for findOrCreateChild to avoid getting ancestral nodes that aren't necessary for the current operation, because in ACL context AccessDeniedException would be thrown if the user doesn't have access to those ancestors.

- Created a test to verify lacking ancestor read permission does not prevent findOrCreateChild from creating nodes.

  1. … 1 more file in changeset.
'Release: update versions for modeshape-3.8.1.Final'

  1. … 64 more files in changeset.
Updated version to 4.1-SNAPSHOT

  1. … 64 more files in changeset.
'Release: update versions for modeshape-4.0.0.Final'

  1. … 64 more files in changeset.
'Release: update versions for modeshape-4.0.0.Beta2'

  1. … 64 more files in changeset.
MODE-2301 Added support for indexes to be updated synchronously or asynchronously

Prior to this commit, all updates to the indexes in the 4.0 codebase were asynchronous. That means that

the Session.save() method added the ChangeSet describing the session's changes onto the event bus and

then returned. All index updates were done in separate listener threads on the event bus, so it's entirely

possible (and perhaps likely) that any updates to the indexes happen after the client's call to Session.save()

returned. The net effect is that the client might make changes and immediately issue a query that would not

find the recently-saved changes. Additionally, there was no way for the client to know when the indexes would

be updated.

With this commit, it is possible to define whether each index is updated synchronously before the

the Session.save() returns, or asynchronously so that index updates are made in a separate thread.

This commit changes the default behavior of the index updates to be *synchronous*.

In a cluster, any changes made on one process are sent via the change bus to the other processes,

and the indexes in those other processes are always updated asynchronously. In other words, if an

index provider keeps copies of the indexes on every process, then only the local indexes are updated

synchronously before save returns -- and that Session.save() does not wait until the indexes in the other

processes are updated.

In order to properly implement this, a small change was made to the ChangeBus to expand the semantic concept

of an "in-thread" listener. Prior to this, "in-thread" meant that the listener only received locally-originating

change sets. Now, it's still possible to do this (and the journal uses this older behavior), but it's also

possible to register a listener such that locally-originating change sets are handled in-thread while remotely

originating change sets are handled asynchronously.

  1. … 19 more files in changeset.
Changed components versions to 2.8.2.GA.

  1. … 67 more files in changeset.
MODE-2151 Added support for CHILDCOUNT dynamic operand

Pretty basic support that should prove quite useful in certain situations. This may be relatively

expensive when the repository has nodes with lots of children since it requires loading the parent

node's child references in order to obtain the count. The CHILDCOUNT criteria would therefore work

much better/faster as filtering criteria in a query that already defines criteria that indexes can

use.

    • -0
    • +32
    ./src/main/java/org/modeshape/jcr/api/query/qom/ChildCount.java
  1. … 16 more files in changeset.
MODE-2286 Made it easier to use the ModeShape public API for queries

  1. … 1 more file in changeset.
'Release: update versions for modeshape-4.0.0.Beta1'

  1. … 64 more files in changeset.
MODE-2160 Incorporated recent comments and added validation of IndexDefinintions before registration.

  1. … 10 more files in changeset.
MODE-2160 Completed the first stab at a local index provider. There are only a few very limited test cases, but they do pass and show that the provider is able to be included in the query plan, properly selected for use, and properly used during query execution.

  1. … 54 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.

    • -0
    • +33
    ./src/main/java/org/modeshape/jcr/api/query/qom/NodeId.java
  1. … 19 more files in changeset.
'Release: update versions for modeshape-4.0.0.Alpha4'

  1. … 65 more files in changeset.
Updated artifacts version to 3.8.1.GA and changed the GitConnector tests to reflect the structure of the https://github.com/jboss-integration/modeshape repository.

  1. … 67 more files in changeset.
'Release: update versions for modeshape-3.8.0.Final'

  1. … 64 more files in changeset.
'Release: update versions for modeshape-4.0.0.Alpha3'

  1. … 65 more files in changeset.
'Release: update versions for modeshape-3.7.4.Final'

  1. … 64 more files in changeset.
Changed snapshot version to 3.7-SNAPSHOT to more accurately reflect the branch.

  1. … 64 more files in changeset.
'Release: update versions for modeshape-3.7.3.Final'

  1. … 64 more files in changeset.
Changed to 3.8-SNAPSHOT

  1. … 64 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: https://issues.jboss.org/browse/JBJCA-1027

  1. … 93 more files in changeset.
'Release: update versions for modeshape-4.0.0.Alpha2'

  1. … 65 more files in changeset.
MODE-2160 Refactored the query engine and index provider SPI.

Changed how index providers are initialized, changed the indexing to use only events, changed the reindexing mechanism to use a much simplified IndexWriter, and added a partial LocalIndex and provider implementation (still needs work).

    • -0
    • +146
    ./src/main/java/org/modeshape/jcr/api/index/IndexDefinition.java
    • -0
    • +95
    ./src/main/java/org/modeshape/jcr/api/index/IndexManager.java
  1. … 107 more files in changeset.
'Release: update versions for modeshape-3.7.2.Final'

  1. … 64 more files in changeset.
MODE-2188 Added management of index providers to Wildfly subsystem

It is now possible to manage the index providers using the Wildfly configuration and CLI tools.

Additionally, ModeShape is no longer dependent upon Lucene or Hibernate Search.

  1. … 141 more files in changeset.
MODE-2019 Implemented the JCR event functionality.

  1. … 16 more files in changeset.
'Release: update versions for modeshape-4.0.0.Alpha1'

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

  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.

Specifically:

* 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
    • +32
    ./src/main/java/org/modeshape/jcr/api/query/qom/Ordering.java
  1. … 226 more files in changeset.