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

HighCardSqlTupleReader does not close SQL Connections

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.1.1 GA
    • Fix Version/s: 3.1.2 GA
    • Component/s: None
    • Labels:
      None

      Description

      The query below creates 36 open connections in our connection pool. The problem is, that the HighCardSqlTupleReader is used, it is created from the MDX Filter() expression in RolapNativeSet.execute()

              public Object execute(ResultStyle desiredResultStyle) {
                  switch (desiredResultStyle) {
                  case ITERABLE:
                      return executeList(new HighCardSqlTupleReader(constraint));
                  case MUTABLE_LIST:
                  case LIST:
                      return executeList(new SqlTupleReader(constraint));
                  }

      If I replace the HighCardSqlTupleReader with SqlTupleReader, everything is fine.

      The original query runs against a flat schema (everything in one single table):

      WITH MEMBER [Measures].[MinusUmsatz] AS '- [Measures].[Umsatz]'
      MEMBER [Marke].[Einnahmen] AS 'Aggregate(Filter([Marke].[Marke].members,([Measures].[Umsatz] > 0)))'
      MEMBER [Measures].[Einnahmen] AS '([Measures].[Umsatz],[Marke].[Einnahmen])'
      SELECT {[Measures].[Umsatz],[Measures].[MinusUmsatz],[Measures].[Einnahmen]} ON COLUMNS,
      [Zeit].[Monate].Members ON ROWS
      FROM [AutoCube]

      The foodmart translation is as follows:

      WITH MEMBER [Measures].[NegativeSales] AS '- [Measures].[Store Sales]'
      MEMBER [Product].[SameName] AS 'Aggregate(Filter([Product].[Product Name].members,([Measures].[Store Sales] > 0)))'
      MEMBER [Measures].[SameName] AS '([Measures].[Store Sales],[Product].[SameName])'
      select {[Measures].[Store Sales], [Measures].[NegativeSales], [Measures].[SameName]} ON COLUMNS,
        {[Product].[All Products]} ON ROWS
      from [Sales]
      where [Time].[1997]

      I'm not sure if the foodmart version reproduces the problem. It seems that all measures have to be present in order to reproduce the problem, the Aggregate(Filter(..)) alone works fine too.

        Activity

        Hide
        Will Gorman added a comment -
        I've committed this change to the trunk (change #12995) and the 3.1 branch (change #12996). This fix should be available in Mondrian 3.1.2.
        Show
        Will Gorman added a comment - I've committed this change to the trunk (change #12995) and the 3.1 branch (change #12996). This fix should be available in Mondrian 3.1.2.

          People

          • Assignee:
            Will Gorman
            Reporter:
            avix
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: