Skip to content

Commit

Permalink
timeout for get node selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ZymoticB committed Aug 22, 2019
1 parent 9c9a691 commit 667ea03
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/server/plugin/datastore/sql/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,8 @@ func (ds *SQLPlugin) GetNodeSelectors(ctx context.Context,
callCounter := ds_telemetry.StartGetNodeSelectorsCall(ds.prepareMetricsForCall(ctx))
defer callCounter.Done(&err)

ctx, cancel := context.WithTimeout(ctx, time.Second)
defer cancel()
return getNodeSelectors(ctx, ds.db.databaseType, ds.db.raw, req)
}

Expand Down

0 comments on commit 667ea03

Please sign in to comment.