Bug 1017684 - ModeShape sometimes doesn't publish all models of Teiid VDB
Summary: ModeShape sometimes doesn't publish all models of Teiid VDB
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: ModeShape
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Van Halbert
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-10 10:39 UTC by Lucie Fabrikova
Modified: 2013-10-17 16:18 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Ubuntu 12.04, JBTIS 4.1.3.Beta4, DV 6.0.0.ER2, sun jdk 1.6
Last Closed: 2013-10-15 12:10:19 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBTIS-186 0 Major Closed ModeShape sometimes doesn't publish all models of Teiid VDB 2016-06-09 08:57:19 UTC

Description Lucie Fabrikova 2013-10-10 10:39:07 UTC
Description of problem:
If I publish a teiid VDB with relational models .xmi in given environment, sometimes some (or all) of the models are not published. 

Version-Release number of selected component (if applicable):
ModeShape Client 3.4.0.Final

How reproducible:


Steps to Reproduce:
1. Create Modeshape server (localhost:8080/modeshape-rest, admin/admin)
2. Deploy a VDB with some .xmi models to some publish area on the modeshape server
3. Access the VDB via connection profile (jdbc:teiid:ModeShape@mm://localhost:31000)
4. Execute SQL query SELECT * FROM ModeShape.xmi_model


Actual results:
Sometimes the result of query doesn't contain reference to all .xmi models of VDB

Expected results:


Additional info:

Comment 1 JBoss JIRA Server 2013-10-10 12:38:08 UTC
Barry LaFond <blafond> made a comment on jira JBTIS-186

Lucie, can you attach an example VDB that you've reproduced this issue with?

Comment 2 JBoss JIRA Server 2013-10-10 12:40:53 UTC
Barry LaFond <blafond> made a comment on jira JBTIS-186

Lucie, can you attach an example VDB that you've reproduced this issue with?

And can you check for any error logging during the publish operation?

Comment 3 JBoss JIRA Server 2013-10-10 14:18:36 UTC
Lucie Fabrikova <lfabriko> made a comment on jira JBTIS-186

In the console of server, there was: 
13:48:42,536 INFO  [org.hibernate.search.store.impl.DirectoryProviderHelper] (http-localhost/127.0.0.1:8080-2) HSEARCH000041: Index directory not found, creating: '/home/jbossqa/workspace/jbtis.modeshape.bot.tests.single/tests/org.jboss.tools.modeshape.ui.bot.test/target/requirements/jboss-eap-6.1/standalone/data/modeshape/dv/indexes/nodeinfo'
13:49:59,805 ERROR [org.modeshape.jcr.SequencingRunner] (modeshape-sequencer-8-thread-3) The 'teiid-model-sequencer' sequencer of repository 'dv' had an error while processing '/files/ModeShapeGoodies/RelModels/Books_Oracle.xmi/jcr:content/jcr:data' in workspace 'default' and generating output '/derived/teiid/models/ModeShapeGoodies/RelModels/Books_Oracle.xmi': javax.jcr.RepositoryException: The session with an ID of '75fd022ad' has been closed and can no longer be used. 
	at org.modeshape.jcr.JcrSession.checkLive(JcrSession.java:285) [modeshape-jcr-3.3.5.GA-redhat-1.jar:3.3.5.GA-redhat-1]
	at org.modeshape.jcr.JcrSession.getValueFactory(JcrSession.java:1203) [modeshape-jcr-3.3.5.GA-redhat-1.jar:3.3.5.GA-redhat-1]
	at org.modeshape.jcr.JcrSession.getValueFactory(JcrSession.java:123) [modeshape-jcr-3.3.5.GA-redhat-1.jar:3.3.5.GA-redhat-1]
	at org.modeshape.sequencer.teiid.model.ModelNodeWriter.writeUnresolvedReferences(ModelNodeWriter.java:207)
	at org.modeshape.sequencer.teiid.model.ModelNodeWriter.write(ModelNodeWriter.java:161)
	at org.modeshape.sequencer.teiid.model.ModelSequencer.sequenceModel(ModelSequencer.java:187)
	at org.modeshape.sequencer.teiid.model.ModelSequencer.execute(ModelSequencer.java:98)
	at org.modeshape.jcr.SequencingRunner.run(SequencingRunner.java:227) [modeshape-jcr-3.3.5.GA-redhat-1.jar:3.3.5.GA-redhat-1]
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_39]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_39]
	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_39]

13:50:20,652 INFO  [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ModeShapeExecutionFactory Commit=true;DatabaseProductName=ModeShape;DatabaseProductVersion=3.3.5.GA-redhat-1;DriverMajorVersion=3;DriverMajorVersion=3;DriverName=ModeShape JDBC Driver for JCR;DriverVersion=3.3.5.GA-redhat-1;IsolationLevel=0

Resulting contents of the ModeShape VDB: Books_Oracle.xmi: false, BooksInfo.xmi: true

Comment 4 JBoss JIRA Server 2013-10-11 13:20:03 UTC
Randall Hauch <rhauch> made a comment on jira JBTIS-186

Please verify whether the above stack trace is even related. I suspect the stack trace occurred _when the server was shutdown while ModeShape was actively running the sequencer_. If that's the case, then the sequencing operation would have stopped immediately without saving any content, resulting in "missing information".

(ModeShape runs all sequencing activities in the background, and each one is given its own session with which the sequencer reads and writes to the repository. This session is not available to any other components, meaning the session cannot be closed except by the sequencer. But as one might expect shutting down a repository must necessarily close all open sessions, and this includes any sessions being used by sequencing operations running in the background.)

My guess is that the user too quickly shutdown the server. To fix, simply re-publish the file.

Comment 5 JBoss JIRA Server 2013-10-11 13:51:54 UTC
Randall Hauch <rhauch> made a comment on jira JBTIS-186

Please verify whether the above stack trace is even related. I suspect the stack trace occurred _when the server was shutdown while ModeShape was actively running the sequencer_. If that's the case, then the sequencing operation would have stopped immediately without saving any content, resulting in "missing information".

(ModeShape runs all sequencing activities in the background, and each one is given its own session with which the sequencer reads and writes to the repository. This session is not available to any other components, meaning the session cannot be closed except by the sequencer. But as one might expect shutting down a repository must necessarily close all open sessions, and this includes any sessions being used by sequencing operations running in the background.)

Regarding the exception, my guess is that the user too quickly shutdown the server. To fix, simply re-publish the file.

If the exception is unrelated, then you might not just be waiting long enough. The sequencing operation is asynchronous (via an internal queue), which means that it may take a few minutes (or longer if the server is under load) for the sequencing output to appear in the repository. To test this out, simply perform your procedure and then repeat step 4 multiple times to see if additional rows show up in the query results.

Comment 6 JBoss JIRA Server 2013-10-14 08:48:47 UTC
Lucie Fabrikova <lfabriko> made a comment on jira JBTIS-186

Thank you, I added longer waiting after publishing to server, and everything was published.

Comment 7 JBoss JIRA Server 2013-10-14 14:03:22 UTC
Paul Leacu <pleacu> made a comment on jira JBTIS-186

Lucie -
         If there is no longer an issue please close this Jira - thank you.
                         --paull

Comment 8 JBoss JIRA Server 2013-10-15 10:16:39 UTC
Lucie Fabrikova <lfabriko> updated the status of jira JBTIS-186 to Closed


Note You need to log in before you can comment on or make changes to this bug.