<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? 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. This can be debugged without a debugger. If it is a null value of some sort we can trace back to where it came from in the code. 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 <Bart.Pappyn@vandewiele.com><BR>À : Mondrian developer mailing list <mondrian@pentaho.org><BR>Envoyé le : Mardi, 23 Janvier 2007, 13h50mn 42s<BR>Objet : 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> </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> </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> </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> </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? </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>I thought that 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> </DIV>
<DIV dir=ltr align=left><SPAN class=640583812-23012007><FONT face=Arial color=#0000ff size=2>I thought A) could only be satisfied if get() of 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> </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> </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> </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> </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> </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> </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> </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 - 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> </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> </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. But that's mutiple threads and it was in JDK 1.4 (the memory model changed in 1.5 I think). The issue is that the instructions in the Java code can be run out of order to the way you've coded them. E.g. a=1; b=2; a=b; can be run just a=2; b=2; because that's what it is equivalent to. 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. 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. 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. 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 <jsichi@gmail.com><BR>À : Pappyn Bart <Bart.Pappyn@vandewiele.com><BR>Cc : Mondrian developer mailing list <mondrian@pentaho.org><BR>Envoyé le : Lundi, 22 Janvier 2007, 20h10mn 24s<BR>Objet : [Mondrian] Re: VirtualCubeTest.testCalculatedMemberAcrossCubes failing on SMP<BR><BR>
<DIV>Something interesting: I noticed that HotSpot was automatically <BR>selecting Server mode on the SMP machine (whereas on my laptop it <BR>autoselects Client mode). 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>> Pappyn Bart wrote:<BR>>> John,<BR>>><BR>>> Could you tell me what kind of OS is running on your<BR>>> 4-way SMP machine ? And on you laptop ?<BR>> <BR>> SMP: Red Hat Enterprise Linux (not sure of version);
JVM is HotSpot <BR>> 1.5.0_10-b03<BR>> <BR>> Laptop: Edgy Eft version of Ubuntu Linux; JVM is HotSpot 1.5.0_04-b05<BR>> <BR>> My guess is that it's likely to be a timing-sensitive thing. The <BR>> property trigger stuff looked suspicious, but I tried disabling that out <BR>> and it still happens. I also tried disabling <BR>> testFormatStringExpressionCubeNoCache (since it runs just before and has <BR>> cache disabled on a base cube underlying a virtual cube) but the failure <BR>> still occurred.<BR>> <BR>> JVS<BR>> <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>