teragrep / pth_06

Teragrep Datasource for Apache Spark
GNU Affero General Public License v3.0
0 stars 5 forks source link

Resource leaks in StreamDBClient.java: 399 #58

Open StrongestNumber9 opened 2 months ago

StrongestNumber9 commented 2 months ago

Describe the bug

 *** CID 1594354:  Resource leaks  (RESOURCE_LEAK)
/src/main/java/com/teragrep/pth_06/planner/StreamDBClient.java: 399 in com.teragrep.pth_06.planner.StreamDBClient$GetArchivedObjectsFilterTable.create(org.jooq.DSLContext, org.jooq.Condition)()
393                                         .where(streamdbCondition)
394                         );
395                 query.execute();
396     
397     
398                 // this could be within tmpTableCreateSql but JOOQ can't (yet) https://u15810271.ct.sendgrid.net/ls/click?upn=u001.AxU2LYlgjL6eX23u9ErQy8RfUt2gZHpyUBWvsZRFV-2Fo9h6OULfkpYi9j1OByoOQZAMoA1ZmWGb-2BjzDIXN9f4Kg-3D-3DXHKR_76xK9dYh48DybVYTYdtY3aYHI64TWsPyPDCJYINJM1GxkMl0VXJuwVn8PIKFsLcYFdxdfwye-2BaRR3dYLbKosZ1mS0NeeUWHcOKNvlj75p7IXNcFKRuPuFTbauCaoigw2FGHQB-2FCQ63y4bmvMtMlCu5I5JoGIB813tJxwxhqxUZww-2FrukV4yg7WMoUDch5sSdFACZInJl-2FYDIsSjJ6uC2wQ-3D-3D
>>>     CID 1594354:  Resource leaks  (RESOURCE_LEAK)
>>>     Failing to save or close resource created by "ctx.createIndex(com.teragrep.pth_06.planner.StreamDBClient.GetArchivedObjectsFilterTable.hostIndex).on(com.teragrep.pth_06.planner.StreamDBClient.GetArchivedObjectsFilterTable.FILTER_TABLE, com.teragrep.pth_06.planner.StreamDBClient.GetArchivedObjectsFilterTable.host_id, com.teragrep.pth_06.planner.StreamDBClient.GetArchivedObjectsFilterTable.tag)" leaks it.
399                 ctx.createIndex(GetArchivedObjectsFilterTable.hostIndex)
400                         //.on(FILTER_TABLE, directory, host_id, tag, stream).execute(); // FIXME this happens only on dev kube due to old mariadb: Index column size too large. The maximum column size is 767 bytes.
401                         .on(GetArchivedObjectsFilterTable.FILTER_TABLE, GetArchivedObjectsFilterTable.host_id, GetArchivedObjectsFilterTable.tag).execute();
402             }
403     
404         }

Software version

3.0.1