Clone Tools
  • last updated a few minutes ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
MODE-2562 Fixes the parsing of backslash characters by the JsonReader

  1. … 11 more files in changeset.
MODE-2527 Renames the schematic package to org.modeshape and removes all ISPN related code.

  1. … 299 more files in changeset.
MODE-2528 Removes any ISPN specific SPI from the SchematicDB and LocalDocumentStore. Makes some changes to transactions processing, preparing for non ISPN storage.

  1. … 47 more files in changeset.
MODE-2437 Cleaned up some more dependencies.

  1. … 1 more file in changeset.
MODE-2437 Removed Infinispan test-jar dependencies and reduced as much as possible the regular ISPN API dependencies throughout the code.

  1. … 52 more files in changeset.
MODE-2309 Corrected handling of non-ASCII characters when reading and writing JSON via binary streams by enforcing UTF-8

  1. … 3 more files in changeset.
MODE-2309 Corrected handling of non-ASCII characters when reading and writing JSON via binary streams by enforcing UTF-8

  1. … 3 more files in changeset.
MODE-2254 Changed the JsonSidecarExtraPropertiesStore to avoid trying to interpret string properties as dates by default and also fixed a potential StringIndexOutOfBounds exception when converting ISO 8601 strings to dates.

Conflicts:

modeshape-jcr/src/test/java/org/modeshape/connector/filesystem/FileSystemConnectorTest.java

  1. … 3 more files in changeset.
MODE-2254 Changed the JsonSidecarExtraPropertiesStore to avoid trying to interpret string properties as dates by default and also fixed a potential StringIndexOutOfBounds exception when converting ISO 8601 strings to dates.

  1. … 3 more files in changeset.
MODE-2254 Changed the JsonSidecarExtraPropertiesStore to avoid trying to interpret string properties as dates by default and also fixed a potential StringIndexOutOfBounds exception when converting ISO 8601 strings to dates.

Conflicts:

modeshape-jcr/src/test/java/org/modeshape/connector/filesystem/FileSystemConnectorTest.java

  1. … 3 more files in changeset.
MODE-2066 Migrated to Infinispan 6.0.1 and JGroups 3.4.1. Beside the changes involving package migrations and API changes, because the BDB and JDBM cachestore have not been ported to 6.x yet, all references (only unit tests) to those cache stores were removed and replaced with LevelDB. The old FileCacheStore has been discontinued and therefore replaced with SingleFileStore.

  1. … 90 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. … 366 more files in changeset.
MODE-2081 Changed the license for ModeShape code to ASL 2.0.

  1. … 106 more files in changeset.
Schematic improvement to add ability to merge documents

  1. … 6 more files in changeset.
MODE-1286 Added more tests for the Git connector

The Git connector is running much better now after the new tests

helped check the functionality.

This includes a change to the Connector SPI that allows the connector

to offer a direct way to find a parent's ChildReference to a particular

child node. When some connectors have *lots* of children under a single

parent, getting the path to that child can be expensive because the

repository (or session) has to find the ChildReference in the parent's

(potentially-segmented) list of ChildReferences. With lots of children,

this becomes very expensive.

Now, a new method on ChildReferences allows the LazyCachedNode to

directly ask the DocumentStore (and thus the Connector) for the child

reference. Some connectors (like the Git connector) can do this

directly.

  1. … 38 more files in changeset.
MODE-1703 Minor improvements

Based upon feedback, two sections of commented-out code were removed (they'd been there

for some time) and the Code.Externalizer methods were changed to use constants rather

than magic numbers for the types of the Code classes.

  1. … 1 more file in changeset.
MODE-1703 Minor improvements

Based upon feedback, two sections of commented-out code were removed (they'd been there

for some time) and the Code.Externalizer methods were changed to use constants rather

than magic numbers for the types of the Code classes.

  1. … 1 more file in changeset.
MODE-1703 Corrected serialization of Schematic deltas

Array objects were not being serialized/deserialized properly

within the delta's operation instances (e.g., PutOperation).

Normally, all SchematicEntry (e.g., Documents containing values

such as Arrays and other Documents) are serialized using BSON, and

this works correctly in the non-clustered case. However, in the

clustered case, the changes made to one Document are recorded to

create a SchematicEntryDelta that is shipped across the Infinispan

cluster. (This way we can ship only the changes to the

SchematicEntry rather than the whole document.) Thus the problem

only manifest itself in clustered configurations.

The actual problem stemmed from the fact that an

SchematicEntryDelta and its Operation objects are all

externalizable (with custom Externalizers). The Operation objects

can contain individual values, Document or Array objects. These are

also externalizable, but there was a single DocumentExternalizer

for both Document and Array objects and the DocumentExternalizer

wrote/read both to/from BSON.

However, the BSON format (which is simply a binary representation

of JSON documents, with a few extra value types) is only valid for

Documents; a standalone Array cannot be written in BSON format.

The solution was to use the DocumentExternalizer for Documents, but

a new ArrayExternalizer for Arrays. This ArrayExternalizer still

uses BSON, but it uses a subset of the BSON representation to

serialize Array objects. But, it does work well and fixes the

problem.

Quite a few new tests were added to verify that the various

operations with various parameters are indeed externalizable. The

tests don't cover all the permuations, but they do attempt to cover

the different kinds of operations with documents and arrays.

To make the Operation objects easily testable, equals and hashCode

methods were added to all the Operation subclasses. Additionally,

all of the externalizers were manually reviewed for asymmetric read

and write methods (e.g, writing an object to the ObjectOutputStream

but reading an integer from the ObjectInputStream), and several

asymmetries were found in the Externalizers for BSON value types

that ModeShape doesn't currently use, and these asymmetries were

corrected.

All unit and integration tests pass with these changes.

  1. … 23 more files in changeset.
MODE-1703 Corrected serialization of Schematic deltas

Array objects were not being serialized/deserialized properly

within the delta's operation instances (e.g., PutOperation).

Normally, all SchematicEntry (e.g., Documents containing values

such as Arrays and other Documents) are serialized using BSON, and

this works correctly in the non-clustered case. However, in the

clustered case, the changes made to one Document are recorded to

create a SchematicEntryDelta that is shipped across the Infinispan

cluster. (This way we can ship only the changes to the

SchematicEntry rather than the whole document.) Thus the problem

only manifest itself in clustered configurations.

The actual problem stemmed from the fact that an

SchematicEntryDelta and its Operation objects are all

externalizable (with custom Externalizers). The Operation objects

can contain individual values, Document or Array objects. These are

also externalizable, but there was a single DocumentExternalizer

for both Document and Array objects and the DocumentExternalizer

wrote/read both to/from BSON.

However, the BSON format (which is simply a binary representation

of JSON documents, with a few extra value types) is only valid for

Documents; a standalone Array cannot be written in BSON format.

The solution was to use the DocumentExternalizer for Documents, but

a new ArrayExternalizer for Arrays. This ArrayExternalizer still

uses BSON, but it uses a subset of the BSON representation to

serialize Array objects. But, it does work well and fixes the

problem.

Quite a few new tests were added to verify that the various

operations with various parameters are indeed externalizable. The

tests don't cover all the permuations, but they do attempt to cover

the different kinds of operations with documents and arrays.

To make the Operation objects easily testable, equals and hashCode

methods were added to all the Operation subclasses. Additionally,

all of the externalizers were manually reviewed for asymmetric read

and write methods (e.g, writing an object to the ObjectOutputStream

but reading an integer from the ObjectInputStream), and several

asymmetries were found in the Externalizers for BSON value types

that ModeShape doesn't currently use, and these asymmetries were

corrected.

All unit and integration tests pass with these changes.

  1. … 23 more files in changeset.
MODE-1581 Added support for backing up and restoring repositories

Introduced a new facility for backing up an entire repository to files on the file system. The backup process writes the JSON representation of each node's content (up to 100K JSON documents per compressed backup file) and writes out the binary content (one file per binary value, named with the value's SHA1). The process also listens for changes made to the repository during the time the backup process is running, and writes the JSON representations of each of the nodes changed during that time - this means that backups can be performed while the repository is still in use (although backing up a repository for migration should only be done on a repository that is not being used). The result should be a consistent backup of a repository's entire content.

It is also possible to restore a repository to the state represented in a backup. This destroys all existing repository content, adds all of the nodes and binary values in the backup, restarts the repository, and reindexes all content in the repository.

Note that there still may be issues with how we're getting accessing all of the keys in the Infinispan cache. This has been encapsulated in the InfinispanUtil class, and can be improved over time. (At this point, Infinispan only supports using distributed execution on clustered caches; see https://issues.jboss.org/browse/ISPN-2192 for an enhancement request to allow using distributed execution on all caches. Additionally, there are limitations for local caches, though InfinispanUtil attempts to work around these limitations).

    • -0
    • +37
    ./DocumentSequence.java
  1. … 51 more files in changeset.
MODE-1526 Correct persistence functionality

The DocumentExternalizer was checking the number of bytes available for reading without blocking, and this seemed to always return 0 bytes. The DocumentExternalizer was then immediately returning without actually reading any of the content; obviously this was wrong. Now, with some minor changes to the BSON reader/writer, the DocumentExternalizer is merely always just reading the BSON document.

This appears to have fixed the persistence issue, and the recently-added unit test now runs (after some modifications). Note that we're still apparently having issues with the index (native) write locks being kept after shutdown; this will be worked under MODE-1512.

  1. … 2 more files in changeset.
MODE-1521 Adde support for 'put-if-absent' behavior in the Schematic Editor/Changes functionality

Using the Editor framework to modify a document didn't always work correctly when used in a heavily

concurrent way, because when some of the 'put' operations (to use an empty document) were applied they'd

forcibly override any existing value created since the changes were recorded. Adding a 'put-if-absent'

operation makes the changes more correctly match the semantics.

All unit tests and integration tests succeed with these changes.

  1. … 18 more files in changeset.
MODE-1524 Changed Infinispan Externalizer implementations

The Infinispan Schematic Externalizers were changed from implementing AdvancedExternalizer

(which has some benefits but also issues in AS7.1) to Externalizer (which works in all environments

but isn't as efficient as AdvancedExternalizer).

One important fix: several of the externalized classes did not have a SerializeWith annotation.

  1. … 22 more files in changeset.
MODE-1375 Added support for system property variables in repository configuration JSON documents

The JSON Schema validation logic already looked for cases where a field value object does

not have the correct type expected in the JSON Schema; such situations were reported as

errors (just like the other errors). This was changed so that, in these situations, the

schema validator tries to convert the actual value to the expected type; if that doesn't work,

the error is reported as usual, but if it can be converted, a special "mismatched type" error

is reported instead and includes the actual value, the converted value, the actual type,

and the converted type. (To public users, this is merely just a regular error, though.)

Also added a method to create a copy of a Document using a supplied `ValueTransformer` instance,

which the copy logic uses to transform each of the values within the Document. This copy

logic returns the same Document instance (not a copy) if no values were transformed, but

returns a new Document object if at least one value was transformed.

Added another method to create a copy of a Document using the validation results, where

we look for all of the "mismatched type" errors and use the converted value in place of the

actual value. (This process includes nested documents and arrays.)

Then the RepositoryConfiguration constructors were modified to try to create a copy

of the supplied document using a SystemPropertyTransformer; if a new Document were created

(because variables were replaced), then the new Document is validated against the schema

and any "mismatched type" values are used to create a copy of the document with the

mismatched values converted to the expected values. The RepositoryConfiguration then

uses the new Document with converted values, and the user can continue to validate

the configuration using the existing "validate()" method. This is where any problems

with the system properties will show up to the user. For example, if a variable is

replaced with a system property that cannot be converted to the type expected by the

JSON Schema for that field, a normal validation error will be included in the validation

results.

In general, all this happens transparently to RepositoryConfiguration users.

  1. … 24 more files in changeset.
MODE-1289 Migrated additional tests and fixed more bugs

Migrated the ModeShapeTckTest suite, which is an extension to the standard TCK test suite

included in the Jackrabbit tests. Our suite adds a lot of tests for versioning, import,

auto-create, locking, etc. Currently all of the test methods were migrated (and a few

were added).

  1. … 55 more files in changeset.
MODE-1289 Added more tests and corrected the Schematic's Operation framework

  1. … 17 more files in changeset.
MODE-1289 Implemented versioning and import/export

Created the JcrVersionManager that contained most of the logic from the legacy 'modeshape-jcr' module.

Much of that logic could be moved as is, but any of it that directly used the graph API or batches

had to be changed to use the new CachedNode API. The latter should be significantly more efficient

than the former, since the former was forcing at least one refresh (and sometimes multiple refreshes)

of the version history, while the CachedNode API doesn't require any refreshes.

Added support for importing and exporting repository content using system and document views, as

defined by the specification. Migrated the unit tests for the import/export functionality.

Note that unit tests for the versioning have not yet been migrated, but will be in forthcoming commits.

  1. … 104 more files in changeset.
MODE-1289 New approach for storing/caching JCR content

This is the first commit to start the 3.0 effort, which involves a major change to how

the JCR layer stores and caches information. The new approach is based upon Infinispan and uses

Infinispan's cache loaders for persistence, and JSON-like documents (that are in-memory

structures not needing to parsed/written) are used to store information for each node.

There are several new Maven modules:

- modeshape-jcr-redux

- modeshape-schematic

The 'modeshape-jcr-redux' module will eventually replace the 'modeshape-jcr' module once

the implementation is far-enough along. And the 'modeshape-schematic' module will likely

move into the Infinispan project, so that needs to remain separate.

Although it may seem strange and unkempt to have the new JCR implementation in a new module,

doing so means that we can continue to rebase from 'master' (and the 2.7 work) for at least

some time. When the new module becomes complete enough, we'll move it and replace the

existing 'modeshape-jcr' module. It's also convenient to have both the old and new implementations

around in the same codebase.

The build was changed to focus upon the (few) modules that are oriented around the new

implementation. So the following can be used to build the newer codebase:

mvn clean install

However, the build has a new Maven profile called "legacy" that can be used to build the

old modules. We kept this to make sure that any rebasing can be compiled and verified.

For example, to build everyhing, including the new modules and the 2.x-style modules,

use the following command:

mvn clean install -Plegacy

As the newer 'modeshape-jcr-redux' progresses and other modules (e.g., sequencers, web,

jboss, text extractors) are converted to use the new module, they should be moved

from the 'legacy' profile into the main set of modules in the top-level 'pom.xml'

    • -0
    • +61
    ./CodeWithScope.java
    • -0
    • +1857
    ./EditableArray.java
    • -0
    • +530
    ./EditableDocument.java
    • -0
    • +206
    ./JsonSchema.java
    • -0
    • +344
    ./MergeDocument.java
  1. … 433 more files in changeset.