Bug 780412 (SOA-2843) - Teiid "dynamicvdb-portfolio" example demonstrates dynamic VDB loading sequence issue
Summary: Teiid "dynamicvdb-portfolio" example demonstrates dynamic VDB loading sequenc...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: SOA-2843
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: Documentation, Examples, EDS
Version: 5.1.0.ER7
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 5.1.0 GA
Assignee: Dana Mison
QA Contact:
URL: http://jira.jboss.org/jira/browse/SOA...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-25 03:19 UTC by Len DiMaggio
Modified: 2011-10-26 19:31 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-26 19:31:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 780413 0 high CLOSED API to force metadata read 2021-02-22 00:41:40 UTC
Red Hat Issue Tracker SOA-2843 0 Critical Closed Teiid "dynamicvdb-portfolio" example demonstrates dynamic VDB loading sequence issue 2013-09-26 18:44:46 UTC

Internal Links: 780413

Description Len DiMaggio 2011-01-25 03:19:23 UTC
Affects: Documentation (Ref Guide, User Guide, etc.), Interactive Demo/Tutorial
Workaround Description: To work around this error - the user must:

1. Stop the server
2. Delete the teiid cache (server/profile/
3. Perform steps 1-4 - in the order listed above.

The problem and workaround seem to be 100% reproducible.


project_key: SOA

If the user executes the example's steps in the order - then the example runs successfully:

1. Start the server
2. Create the DB tables
3. Deploy the .vdb file
4. At this point - this command returns the expected rows: ./run.sh localhost 31000 dynamicportfolio "select * from product"

But - if the user performs step #3 first, then the query performed in step #4 fails with an error of:  

Caused by: [TeiidProcessingException]Remote org.teiid.api.exception.query.QueryResolverException: Group does not exist: product

Comment 1 Van Halbert 2011-01-25 03:34:02 UTC
This isn't just a problem with the example, this could happen anytime a dynamic vdb is being used in this type of scenario.

Comment 2 Steven Hawkins 2011-01-25 05:33:04 UTC
Just to be clear, if you perform things in the sequence of

3, 1, 2, 4

and the database tables are created after the server is started and the .vdb file is deployed then you are seeing expected behavior.  Teiid does not automatically detect / resolve metadata changes for a given vdb name/version.


Comment 3 Len DiMaggio 2011-01-25 14:35:19 UTC
Other than deleting the teiid cache - and restarting the server - what's the best/easiest course of action for a user to clear up this situation?


Comment 4 Steven Hawkins 2011-01-25 15:14:53 UTC
https://issues.jboss.org/browse/TEIID-1329 is a feature request to programatically trigger metadata loads for dynamic vdbs.  However it's a little more complicated than it seems due to the way we hold the metadata structures internally.  Changes to the metadata currently require a new vdb version or something that looks like a redeploy action so that connections using old metadata are dropped.

Other workaround are: you can redeploy with just be an overwrite of the .vdb file, or increment the version number, or set UseConnectorMetadata to true rather than cached which will trigger a reload every time the vdb is loaded without having to delete cache files.

Comment 5 Van Halbert 2011-01-25 15:21:00 UTC
Therefore, should all the dynamic vdb's in the examples have UseConnectorMetadata=true

Comment 6 Steven Hawkins 2011-01-25 15:28:26 UTC
I wouldn't come to that conclusion.  There is only an issue if you have a different expectation of the dynamic vdb feature than what it actually does.  And setting the value to true will still require a restart or redeploy of the vdb.  It would be simpler to just expect people to follow the sequence of steps in the readme or add more verbage to the reference on metadata loading (actually its already covered pretty well, perhaps you'd be looking for a warning or note call out).  You could also add another example with the purpose of demonstrating the reload of metadata.

Comment 8 Len DiMaggio 2011-01-25 16:20:15 UTC
And...we need to describe the current operation of the dynamic VDBs for users - is this accurate?

A dynamic VDB has its virtual database metadata loaded when the VDB is deployed. As a result, it is possible to create a situation where a dynamic VDB may not be able to fully access its backing database tables. For example, if a VDB accesses tables in a backing database, and the VDB is deployed to a server before the backing database tables are created, then the VDB's metadata will not automatically be reloaded. The proper sequence for using dynamic VDBs is to create any backing database tables before deploying a VDB that relies on those tables.

Comment 9 Len DiMaggio 2011-01-25 16:23:46 UTC
Link: Added: This issue related SOA-2844


Comment 10 Anne-Louise Tangring 2011-01-28 14:16:48 UTC
Workaround Description: Removed: 
To work around this error - the user must:

1. Stop the server
2. Delete the teiid cache (server/profile/
3. Perform steps 1-4 - in the order listed above.

The problem and workaround seem to be 100% reproducible.

 Added: To work around this error - the user must:

1. Stop the server
2. Delete the teiid cache (server/profile/
3. Perform steps 1-4 - in the order listed above.

The problem and workaround seem to be 100% reproducible.




Comment 12 Van Halbert 2011-02-16 15:39:55 UTC
Link: Added: This issue is a dependency of TEIID-1470


Comment 13 Dana Mison 2011-02-17 05:02:14 UTC
Writer: Added: Darrin


Comment 14 Dana Mison 2011-02-17 05:03:08 UTC
The GSG also mentions this in one of the examples.

Comment 15 Dana Mison 2011-02-17 05:03:08 UTC
Release Notes Docs Status: Added: Documented as Known Issue
Release Notes Text: Added: Dynamic VDBs capture source meta-data when they are deployed.  Dynamic VDBs without meta-data caching enabled also do this at every time the server starts.  However the captured meta-data will be invalid if the referenced data sources are not available when the dynamic VDB is deployed or if the metadata changes afterwards.   This can be fixed by redeploying the dynamic VDB.  This will also be fixed in a non-caching dynamic VDB by restarting the server.


Comment 16 Van Halbert 2011-10-26 19:31:33 UTC
The sequence of loading vdb metadata has been documented and an enhancement (SOA-2844) has been created to provide reloading of the metadata.


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