[Mondrian] Modified schemas do not reload without a datasource.xml change

Ganong, Kenneth ken.ganong at truvenhealth.com
Tue Nov 3 09:32:46 EST 2015

We found the MONDRIAN-2265 jira issue which matches our issue exactly. It also already has a patch from Luc in Mondrian master. That patch seems to be what will solve the problems we see.


From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org] On Behalf Of Luc Boudreau
Sent: Monday, November 02, 2015 11:58 AM
To: Mondrian developer mailing list <mondrian at pentaho.org>
Subject: Re: [Mondrian] Modified schemas do not reload without a datasource.xml change

I'm guessing that the file changes, but you do not call the CacheControl API to notify it, and thus expect that Mondrian will see the change. If that's right, and your schema file changes, you should use the connection property: UseContentChecksum=true.

That way Mondrian will use the MD5 checksum of your schema as part of the schema key in the pool.

On Mon, Nov 2, 2015 at 11:35 AM, Ganong, Kenneth <ken.ganong at truvenhealth.com<mailto:ken.ganong at truvenhealth.com>> wrote:
We are encountering an issue we believe to be a bug in Mondrian. When a schema changes, but the data sources XML does not change, the schema does not get dynamically refreshed.

We are currently using a workaround in MondrianOlap4jConnection by using

                final mondrian.olap.Schema schema = mondrianConnection.getSchema();

To get the schemas used to populate olap4jCatalogs instead of

schemaMap =

However, we believe this workaround would be incorrect whenever a MondrianOlap4jConnection would be used to interact with more than one catalog, such as when OlapConnection.getOlapCatalogs() is used.

In MondrianOlap4jConnection’s constructor, a CatalogFinder is used to getRolapSchemas. This can end up using FileRepository.getRolapSchemas. FileRepository keeps its RolapSchemas, ServerInfo, DatabaseInfo, and CatalogInfo objects up-to-date by comparing the current content against previousContent. However, this ‘content’ only contains the datasource.xml, so if schemas change and the datasource.xml doesn’t, the RolapSchemas cached by FileRepository never get updated.


Mondrian mailing list
Mondrian at pentaho.org<mailto:Mondrian at pentaho.org>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20151103/960d01a4/attachment.html 

More information about the Mondrian mailing list