<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Can you guys who can reproduce this bug modify the test to use a formatter for the null value?&nbsp; I would really like to know if it is a Java null, a nullValue() or what that is being formatted in the calculated measure's column there.&nbsp; This can be debugged without a debugger.&nbsp; If it is a null value of some sort we can trace back to where it came from in the code.&nbsp; I can't reproduce myself.<BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">----- Message d'origine ----<BR>De : Pappyn Bart &lt;Bart.Pappyn@vandewiele.com&gt;<BR>À : Mondrian developer mailing list &lt;mondrian@pentaho.org&gt;<BR>Envoyé le : Mardi, 23 Janvier 2007, 13h50mn 42s<BR>Objet&nbsp;: RE: [Mondrian] Re:VirtualCubeTest.testCalculatedMemberAcrossCubesfailing on SMP<BR><BR>
<STYLE type=text/css>DIV {
MARGIN:0px;}
</STYLE>

<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>Julian,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>I think I understand something wrong.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>I thought RolapResult executes in several passes :</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>A) Execute stripe and record missing aggregations</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>B) Stop if no requests otherwise load missing aggregations</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>I thought B) would wait until each aggregations is loaded that is currently in batch?&nbsp; </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>I thought that&nbsp;B) would stop if A) was satisfied ?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>I thought A) could&nbsp;only be satisfied if&nbsp;get() of&nbsp;fastbatchingcellreader would actually</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>return a result and not push another request in the batch list ?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>fastbatchingcellreader calls aggrmanager to load aggregations for each batch request,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>it does not matter if there are multiple stars involved, since it will ask the corresponding</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>star for an aggregation object and that calls the load() method of that aggregation.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>Can you point me to the piece of code that would make RolapResult stop faster that I should ?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>Would be helpful to me, in order to understand this piece of code better.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>Thanks,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>Bart</FONT></SPAN></DIV><FONT style="BACKGROUND-COLOR: #ffffff" face=Arial color=#0000ff size=2></FONT><FONT style="BACKGROUND-COLOR: #ffffff" face=Arial color=#0000ff size=2></FONT><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>Julian Hyde<BR><B>Sent:</B> dinsdag 23 januari 2007 11:57<BR><B>To:</B> 'Mondrian developer mailing list'<BR><B>Subject:</B> RE: [Mondrian] Re:VirtualCubeTest.testCalculatedMemberAcrossCubesfailing on SMP<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2>I think the problem is with how mondrian evaluates members using multiple passes. When the measures are coming from a virtual cube, of course there are multiple real cubes, and each of those has a cell reader. But the code in RolapResult assumes there is only one cell reader.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2>Mondrian should check the cell readers for all applicable cubes, and only emit a result when all cell readers have been populated.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2>I haven't implemented the fix yet, but this cause seems very plausible to me.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2>I'm not exactly sure why this problem surfaced after Bart's change&nbsp;- maybe thread-local caches increased the chances of one cache being populated and another not - or why it appears on SMP machines.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2>By the way, in an effort to get this working, I removed Bart's RolapStarAggregationKey (a compound key of BitKey and thread id) and moved to a two-tier hashing scheme. The first tier is a ThreadLocal of maps, and the second tier is a map. Threads which want access to the global map just skip the first tier. Given the difficulties obtaining a unique id for a thread, using a ThreadLocal seemed cleaner. So, even though this didn't fix the bug, I'm going to check in.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=200204710-23012007><FONT face=Verdana color=#000080 size=2>Julian</FONT></SPAN></DIV><BR>
<BLOCKQUOTE style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000080 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> mondrian-bounces@pentaho.org [mailto:mondrian-bounces@pentaho.org] <B>On Behalf Of </B>michael bienstein<BR><B>Sent:</B> Monday, January 22, 2007 12:06 PM<BR><B>To:</B> Mondrian developer mailing list<BR><B>Subject:</B> Re : [Mondrian] Re: VirtualCubeTest.testCalculatedMemberAcrossCubesfailing on SMP<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">I've seen issues with server mode JIT before related to memory boundaries and multiple threads.&nbsp; But that's mutiple threads and it was in JDK 1.4 (the memory model changed in 1.5 I think).&nbsp; The issue is that the instructions in the Java code can be run out of order to the way you've coded them.&nbsp; E.g. a=1; b=2; a=b; can be run just a=2; b=2; because that's what it is equivalent to.&nbsp; The only way to force it to do what you really expected is to synchronize your accesses because that prevents the instruction re-ordering across the memory boundary.&nbsp; This was an issue in Apache Struts at one point because they used a custom Map implementation called "FastHashMap" which gets filled with values and then flipped to be in immutable mode.&nbsp; The problem was that the get() method tested if it was flipped already without synchronizing which looked safe because the flip flag was
 set only after the insertion code.&nbsp; But the JIT reversed the order and the flip was done before the last insertions leading to certain problems on high-end servers.<BR><BR>All that's a moot point if we can't see how multiple threads are being used.<BR><BR>Michael<BR><BR>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman,new york,times,serif">----- Message d'origine ----<BR>De : John V. Sichi &lt;jsichi@gmail.com&gt;<BR>À : Pappyn Bart &lt;Bart.Pappyn@vandewiele.com&gt;<BR>Cc : Mondrian developer mailing list &lt;mondrian@pentaho.org&gt;<BR>Envoyé le : Lundi, 22 Janvier 2007, 20h10mn 24s<BR>Objet&nbsp;: [Mondrian] Re: VirtualCubeTest.testCalculatedMemberAcrossCubes failing on SMP<BR><BR>
<DIV>Something interesting:&nbsp;&nbsp;I noticed that HotSpot was automatically <BR>selecting Server mode on the SMP machine (whereas on my laptop it <BR>autoselects Client mode).&nbsp;&nbsp;I changed build.xml to force usage of Client <BR>mode, and then "ant test" ran through with no failures.<BR><BR>Haven't tried forcing Server mode on laptop yet; if it's timing-related, <BR>it may just be that it takes the combination of a very fast machine plus <BR>Server mode to hit it.<BR><BR>Also, Bart, if you want to send me code modifications to enable tracing <BR>targeted at debugging the problem, please do, and I'll run it through on <BR>the SMP machine and send you the output.<BR><BR>JVS<BR><BR>John V. Sichi wrote:<BR>&gt; Pappyn Bart wrote:<BR>&gt;&gt; John,<BR>&gt;&gt;<BR>&gt;&gt; Could you tell me what kind of OS is running on your<BR>&gt;&gt; 4-way SMP machine ?&nbsp;&nbsp;And on you laptop ?<BR>&gt; <BR>&gt; SMP:&nbsp;&nbsp;Red Hat Enterprise Linux (not sure of version);
 JVM is HotSpot <BR>&gt; 1.5.0_10-b03<BR>&gt; <BR>&gt; Laptop:&nbsp;&nbsp;Edgy Eft version of Ubuntu Linux; JVM is HotSpot 1.5.0_04-b05<BR>&gt; <BR>&gt; My guess is that it's likely to be a timing-sensitive thing.&nbsp;&nbsp;The <BR>&gt; property trigger stuff looked suspicious, but I tried disabling that out <BR>&gt; and it still happens.&nbsp;&nbsp;I also tried disabling <BR>&gt; testFormatStringExpressionCubeNoCache (since it runs just before and has <BR>&gt; cache disabled on a base cube underlying a virtual cube) but the failure <BR>&gt; still occurred.<BR>&gt; <BR>&gt; JVS<BR>&gt; <BR><BR>_______________________________________________<BR>Mondrian mailing list<BR>Mondrian@pentaho.org<BR><A href="http://lists.pentaho.org/mailman/listinfo/mondrian" target=_blank rel=nofollow>http://lists.pentaho.org/mailman/listinfo/mondrian</A><BR></DIV></DIV><BR></DIV></DIV><BR>
<HR SIZE=1>
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! Profitez des connaissances, des opinions et des expériences des internautes sur <A href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com" target=_blank rel=nofollow>Yahoo! Questions/Réponses</A>.</BLOCKQUOTE><BR>______________________________________________________________________<BR>This email has been scanned by the Email Security System.<BR>______________________________________________________________________<BR>
<DIV>_______________________________________________<BR>Mondrian mailing list<BR>Mondrian@pentaho.org<BR><A href="http://lists.pentaho.org/mailman/listinfo/mondrian" target=_blank>http://lists.pentaho.org/mailman/listinfo/mondrian</A></DIV></DIV><BR></DIV></div><br>
                <hr size="1"> 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Yahoo! Questions/Réponses</a>.</body></html>