[Mondrian] MondrianOlap4jConnection requires creation of all RolapConnections

Ganong, Kenneth ken.ganong at truvenhealth.com
Tue Oct 28 17:59:49 EDT 2014

Hello Mondrian Developers,

We've encountered an issue in which a Discover query is creating RolapConnection's for every schema defined in our Datasource.xml. This issue has been encountered in two forms:

*         A failed discover query when one of the unrelated connections ran into an exception during its construction.

*         Severe slow down when many catalogs where defined in Datasource.xml.

Here is what I've gathered from the cause of this issue. Is there something that we are doing incorrectly, is this a corner case, or is this a true issue with Mondrian 3.6?

In MondrianOlap4jConnection's constructor, this for loop goes through every catalog in our Datasource.xml, including ones that are not related to this particular connection.

for (String catalogName : catalogFinder.getCatalogNames(connection))

Inside this for loop is the following line of code which ends up creating a RolapConnection to every schema referenced in Datasource.xml (again, not just the ones related to the connection).

                final Map<String, RolapSchema> rolapSchemas = catalogFinder.getRolapSchemas(connection, catalogName);

Our Datasource.xml has a single datasource with many catalogs in it, like this:

            <Catalog name="a42od970_a42od970_build">
            <Catalog name="a42od970_a42od970_secure1_build">
            <Catalog name="a42od378_a42od378_build">

The code path for creating all of these RolapConnections is:

*         MondrianOlap4jConnection.<init>

*         MondrianServerImpl.getRolapSchemas

*         FileRepository.getRolapSchemas

*         FileRepository$CatalogInfo.access

*         FileRepository$CatalogInfo.getRolapSchema

*         DriverManager.getConnection

I don't understand why creating a single connection would require the creation of every one of these connections.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20141028/35fb4137/attachment-0001.html 

More information about the Mondrian mailing list