Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1482

Resource leak on creation of CassandraSchema

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.10.0
    • 1.11.0
    • cassandra-adapter
    • None

    Description

      Found via the following Coverity scan

      *** CID 138163:  Resource leaks  (RESOURCE_LEAK)
      /cassandra/src/main/java/org/apache/calcite/adapter/cassandra/CassandraSchema.java: 115 in org.apache.calcite.adapter.cassandra.CassandraSchema.<init>(java.lang.String, java.lang.String, java.lang.String, java.lang.String, org.apache.calcite.schema.SchemaPlus, java.lang.String)()
      109         } catch (Exception e) {
      110           throw new RuntimeException(e);
      111         }
      112         this.parentSchema = parentSchema;
      113         this.name  = name;
      114
      >>    CID 138163:  Resource leaks  (RESOURCE_LEAK)
      >>    Ignoring resource created by "org.apache.calcite.runtime.Hook.TRIMMED.add(this.new org.apache.calcite.adapter.cassandra.CassandraSchema.1())" leaks it.
      115         Hook.TRIMMED.add(new Function<RelNode, Void>() {
      116           public Void apply(RelNode node) {
      117             CassandraSchema.this.addMaterializedViews();
      118             return null;
      119           }
      120         });
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mmior Michael Mior
            mmior Michael Mior
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment