Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions internal/sql-analyzer/collector/sql_audit.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ func (c *Collector) getMaxRequestIDs() (map[string]uint64, error) {
if err != nil {
return nil, errors.Wrap(err, "Failed to get oceanbase connection")
}
defer cnx.Close()

if err := cnx.QueryList(c.Ctx, &observers, sqlconst.GetMaxRequestIDByIP, c.TenantID); err != nil {
return nil, errors.Wrap(err, "Failed to query max request ids")
Expand Down Expand Up @@ -149,7 +148,6 @@ func (c *Collector) collectSqlAuditByOBServer(svrIP string, lastRequestID uint64
if err != nil {
return nil, errors.Wrap(err, "Failed to get oceanbase connection")
}
defer cnx.Close()

if err := cnx.QueryList(c.Ctx, &results, sqlconst.GetSqlStatistics, c.TenantID, svrIP, lastRequestID); err != nil {
return nil, err
Expand Down
1 change: 0 additions & 1 deletion internal/sql-analyzer/collector/sql_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ func (w *PlanWorker) processPlan(ctx context.Context, idx int, ident *model.SqlP
w.collector.PlanCache.Remove(*ident) // Remove from cache
return
}
defer cnx.Close()

var plans []model.SqlPlan
if err := cnx.QueryList(ctx, &plans, sqlconst.SelectSqlPlan, ident.TenantID, ident.SvrIP, ident.SvrPort, ident.PlanID); err != nil {
Expand Down
Loading