Bug 1017684 - ModeShape sometimes doesn't publish all models of Teiid VDB
ModeShape sometimes doesn't publish all models of Teiid VDB
Status: CLOSED NOTABUG
Product: JBoss Data Virtualization 6
Classification: JBoss
Component: ModeShape (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Van Halbert
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-10 06:39 EDT by Lucie Fabrikova
Modified: 2013-10-17 12:18 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
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 08:10:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBTIS-186 Major Closed ModeShape sometimes doesn't publish all models of Teiid VDB 2016-06-09 04:57 EDT

  None (edit)
Description Lucie Fabrikova 2013-10-10 06:39:07 EDT
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 08:38:08 EDT
Barry LaFond <blafond@jboss.org> 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 08:40:53 EDT
Barry LaFond <blafond@jboss.org> 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 10:18:36 EDT
Lucie Fabrikova <lfabriko@redhat.com> 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 09:20:03 EDT
Randall Hauch <rhauch@jboss.org> 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 09:51:54 EDT
Randall Hauch <rhauch@jboss.org> 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 04:48:47 EDT
Lucie Fabrikova <lfabriko@redhat.com> 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 10:03:22 EDT
Paul Leacu <pleacu@redhat.com> 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 06:16:39 EDT
Lucie Fabrikova <lfabriko@redhat.com> 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.