Two machines (M1, M2) ; M1 is running a process P1 and M2 is running the process P2
P1 and P2 create one single repository instance (through Spi2davexRepositoryServiceFactory) and reuse it to open/close multiple sessions.
1. Create the following content
2. create a new session
3. Use (session.move()) in order to move the node /test/file.txt to /test/sub/file.txt
4. save the changes (session.save())
5. Close the session
1. Create a new session
2. Get the moved node (Node n = session.getNode(/test/sub/file.txt)) -> works fine
3. Get a property on the node (n.getProperty("jcr:content/jcr:lastModified")) -> throws a PathNotFoundException, eventhough the property exists in the repository (can be checked with an third process creating a new repository instance)
4. Close the session
- No Parallelism, P2 is run right after P1's step 5.
- The PathNotFoundException is always thrown in P2.
- On P2, Refreshing the session after the step 2. does not help.
- The cache behavior is the default one, not CacheBehaviour.OBSERVATION
In P2, the PathNotFound Exception is thrown in
// no valid ancestor node entry
// -> if cnes are complete -> assume that it doesn't exist.
// refresh will bring up new entries added in the mean time
// on the persistent layer.
The try.childNodeEntries.isComplete() returns true when it should not. More in detail, the isComplete method gives:
public boolean isComplete()
The parent.getStatus == EXISTING and I guess it should be invalidated due to the move operation.
Anyway, it seems that the HierarchyManager get messed up
In P2, (step 1.) Get the session from a new Repository instance instead of reusing it.
I'll add a test case to demo it later.