<div dir="ltr">Hi Ken,<div><br></div><div>is it possible that this is related to <a href="http://jira.pentaho.com/browse/MONDRIAN-1056">http://jira.pentaho.com/browse/MONDRIAN-1056</a>?<br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 28, 2014 at 10:59 PM, Ganong, Kenneth <span dir="ltr">&lt;<a href="mailto:ken.ganong@truvenhealth.com" target="_blank">ken.ganong@truvenhealth.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal">Hello Mondrian Developers,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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:<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>A failed discover query when one of the unrelated connections ran into an exception during its construction.<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>Severe slow down when many catalogs where defined in Datasource.xml.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="text-indent:0.5in">for (String catalogName : catalogFinder.getCatalogNames(connection))<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">                final Map&lt;String, RolapSchema&gt; rolapSchemas = catalogFinder.getRolapSchemas(connection, catalogName);<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Our Datasource.xml has a single datasource with many catalogs in it, like this:<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in"><u></u> <u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">&lt;DataSources&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">    &lt;DataSource&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">        &lt;Catalogs&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">            &lt;Catalog name=&quot;a42od970_a42od970_build&quot;&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">            &lt;/Catalog&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">            &lt;Catalog name=&quot;a42od970_a42od970_secure1_build&quot;&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">            &lt;/Catalog&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">            &lt;Catalog name=&quot;a42od378_a42od378_build&quot;&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">            &lt;/Catalog&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">        &lt;/Catalogs&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">    &lt;/DataSource&gt;<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.5in">&lt;/DataSources&gt;<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The code path for creating all of these RolapConnections is:<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>MondrianOlap4jConnection.&lt;init&gt;<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>MondrianServerImpl.getRolapSchemas<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>FileRepository.getRolapSchemas<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>FileRepository$CatalogInfo.access<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>FileRepository$CatalogInfo.getRolapSchema<u></u><u></u></p>
<p><u></u><span style="font-family:Symbol"><span>·<span style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:&#39;Times New Roman&#39;">        
</span></span></span><u></u>DriverManager.getConnection<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I don’t understand why creating a single connection would require the creation of every one of these connections.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">        Ken<u></u><u></u></p>
</div>
</div>

<br>_______________________________________________<br>
Mondrian mailing list<br>
<a href="mailto:Mondrian@pentaho.org">Mondrian@pentaho.org</a><br>
<a href="http://lists.pentaho.org/mailman/listinfo/mondrian" target="_blank">http://lists.pentaho.org/mailman/listinfo/mondrian</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Roland Bouman<br>blog: <a href="http://rpbouman.blogspot.com/" target="_blank">http://rpbouman.blogspot.com/</a><br>twitter: @rolandbouman<br>linkedin: <a href="http://www.linkedin.com/profile/view?id=5142800&amp;trk=tab_pro" target="_blank">http://www.linkedin.com/profile/view?id=5142800&amp;trk=tab_pro</a><br><br>Author of &quot;Pentaho Solutions&quot; (Wiley, ISBN: 978-0-470-48432-6 <a href="http://tinyurl.com/lvxa88" target="_blank">http://tinyurl.com/lvxa88</a>) and &quot;Pentaho Kettle Solutions&quot; (Wiley, ISBN: 978-0-470-63517-9 <a href="http://tinyurl.com/33r7a8m" target="_blank">http://tinyurl.com/33r7a8m</a>)
</div></div></div>