Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-1077

Cache flush for region that is not necessarily populated results in null pointer exception

    Details

    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.
    • QA Validation Status:
      Validated by QA

      Description

      Trying to perform a flush on a dimension/hierarchy that has not necessarily been cached yet results in a null pointer exception. This creates an issue in the use case where you want to perform a flush on a dimension on a regular basis without knowing whether the dimension has been queried since the last flush.

      Example code:

      CacheControl cacheControl;
      RolapCube cube;
      Hierarchy hier;
      Member hierMember = hier.getAllMember();
      CellRegion measuresRegion = cacheControl.createMeasuresRegion(cube);
      CellRegion hierRegion = cacheControl.createMemberRegion(hierMember, true);
      CellRegion flushRegion = cacheControl.createCrossjoinRegion(measuresRegion, hierRegion);
      cacheControl.flush(flushRegion);


      Error:
      java.lang.NullPointerException
      at mondrian.rolap.CacheControlImpl$4.visit(CacheControlImpl.java:455)
      at mondrian.rolap.CacheControlImpl$MemberCellRegion.accept(CacheControlImpl.java:896)
      at mondrian.rolap.CacheControlImpl$CrossjoinCellRegion.accept(CacheControlImpl.java:1043)
      at mondrian.rolap.CacheControlImpl.findAxisValues(CacheControlImpl.java:501)
      at mondrian.rolap.agg.SegmentCacheManager$FlushCommand.call(SegmentCacheManager.java:658)
      at mondrian.rolap.agg.SegmentCacheManager$FlushCommand.call(SegmentCacheManager.java:629)
      at mondrian.rolap.agg.SegmentCacheManager$Actor.run(SegmentCacheManager.java:955)
      at java.lang.Thread.run(Thread.java:662)

        Activity

        Hide
        Luc Boudreau added a comment -
        Fixed in revision 14956 in //open/mondrian. I've also created a unit test in CacheControlTest.testFlushNonPrimedContent().
        Show
        Luc Boudreau added a comment - Fixed in revision 14956 in //open/mondrian. I've also created a unit test in CacheControlTest.testFlushNonPrimedContent().
        Hide
        Will Gorman added a comment -
        I verified the unit test exists and is passing, no NullPointerException occurs in the current build.
        Show
        Will Gorman added a comment - I verified the unit test exists and is passing, no NullPointerException occurs in the current build.

          People

          • Assignee:
            Unassigned User
            Reporter:
            Dan Dosch
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: