[Mondrian] Member Cache flush

Hilario Fernandes hilario.fernandes at cortex-intelligence.com
Wed Sep 9 09:57:45 EDT 2015


I've tryed several mondrian versions since 3.4 and the problem remains so i
decided do look at the CacheControlImpl code to see if i could see some
reason for this behaviour. The call to my code eventually falls into this
method:

protected void flushRegionList(List<CellRegion> cellRegionList) {
        final CellRegion cellRegion;
        switch (cellRegionList.size()) {
        case 0:
            return;
        case 1:
            cellRegion = cellRegionList.get(0);
            break;
        default:
            final CellRegion[] cellRegions =
                cellRegionList.toArray(new
CellRegion[cellRegionList.size()]);
            cellRegion = createUnionRegion(cellRegions);
            break;
        }
        if (!containsMeasures(cellRegion)) {
          *  for (RolapCube cube : connection.getSchema().getCubeList()) {*
*                flush(*
*                    createCrossjoinRegion(*
*                        createMeasuresRegion(cube),*
*                        cellRegion));*
*            }*
        } else {
            flush(cellRegion);
        }
    }


The cellRegionList contains the AllMember i've passed in my code, so it has
no measures, therefore runs the code in bold. That is what doesn't make
sense to me. Why is it cycling all cubes in the schema? And why does the
crossjoin of a the member i passed will result in anything other than empty
when crossed with measures from other cubes?


On Wed, Sep 9, 2015 at 11:08 AM, Hilario Fernandes <
hilario.fernandes at cortex-intelligence.com> wrote:

> Thank you for your reply.
>
> So, i went back to a state before that commit to test it out, and
> apparently the behaviour is the same regarding segments.
>
> To elaborate on how i'm seeing this, I have a segmentCache implementation
> where i'm logging the put/get/remove methods so i can see the remove()
> being called on segments from other cubes after calling the code i
> mentioned. We are also using Hazelcast, so i'm monitoring the cache map and
> i can see it getting cleared also there. Te calls to remove() are done by
> Mondrian, do you think it might have anything to do with havin an external
> segmentCache implementation?
>
> Using these properties cache related, if it makes any difference.
>
> mondrian.rolap.EnableRolapCubeMemberCache = false
> mondrian.rolap.star.disableLocalSegmentCache = true
> mondrian.rolap.star.disableCaching = false
> mondrian.rolap.SegmentCache = org.cache.MySegmentCache
>
>
> On Tue, Sep 8, 2015 at 7:56 PM, Matt Campbell <mcampbell at pentaho.com>
> wrote:
>
>>
>>
>> That’s surprising.  The change for 2366 (
>> https://github.com/YuryBY/mondrian/commit/64f142362450aabb9791f98ce7d5bd3e24a62f80)
>> flushes out the native set cache, but there was nothing changed about
>> segment cache flushing.
>>
>>
>>
>> What are you seeing that shows segments from other cubes getting flushed?
>>
>>
>>
>> *From:* mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
>> *On Behalf Of *Hilario Fernandes
>> *Sent:* Tuesday, September 08, 2015 2:48 PM
>> *To:* Mondrian mailing list <mondrian at pentaho.org>
>> *Subject:* [Mondrian] Member Cache flush
>>
>>
>>
>>
>> I was trying out the fix made with issue
>> http://jira.pentaho.com/browse/MONDRIAN-2366 and found myself with a new
>> problem... For some reason when i execute the code in the issue to clear
>> the member cache for a specific cube, all the segments from other cubes get
>> removed.
>>
>>
>>
>> this is the code:
>>
>>
>>
>> RolapCube cube = schema.lookupCube(cubeName, false)
>>
>> CacheControl cacheControl = con.getCacheControl(null)
>>
>>
>>
>> cube.hierarchies.each{ RolapHierarchy hierarchy ->
>>
>>      if(hierarchy.hasAll()) {
>>
>>
>>  cacheControl.flush(cacheControl.createMemberSet(hierarchy.getAllMember(),
>> true))
>>
>>      }
>>
>> }
>>
>>
>>
>>
>>
>> Any idea why this happens?
>>
>>
>>
>> --
>>
>> Hilario Fernandes
>>
>> _______________________________________________
>> Mondrian mailing list
>> Mondrian at pentaho.org
>> http://lists.pentaho.org/mailman/listinfo/mondrian
>>
>>
>
>
> --
> Hilario Fernandes
>



-- 
Hilario Fernandes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20150909/dd39977d/attachment-0001.html 


More information about the Mondrian mailing list