@@ -47,38 +47,37 @@ type Ingestor struct {
4747 isStopped atomic.Bool
4848}
4949
50- func clientsFromConfig (ctx context. Context , config search.Config ) (map [string ]storeapi.StoreApiClient , error ) {
50+ func clientsFromConfig (config search.Config ) (map [string ]storeapi.StoreApiClient , error ) {
5151 clients := map [string ]storeapi.StoreApiClient {}
52- if err := appendClients (ctx , clients , config .HotStores .Shards ); err != nil {
52+ if err := appendClients (clients , config .HotStores .Shards ); err != nil {
5353 return nil , err
5454 }
5555 if config .HotReadStores != nil {
56- if err := appendClients (ctx , clients , config .HotReadStores .Shards ); err != nil {
56+ if err := appendClients (clients , config .HotReadStores .Shards ); err != nil {
5757 return nil , err
5858 }
5959 }
6060 if config .WriteStores != nil {
61- if err := appendClients (ctx , clients , config .WriteStores .Shards ); err != nil {
61+ if err := appendClients (clients , config .WriteStores .Shards ); err != nil {
6262 return nil , err
6363 }
6464 }
6565 if config .ReadStores != nil {
66- if err := appendClients (ctx , clients , config .ReadStores .Shards ); err != nil {
66+ if err := appendClients (clients , config .ReadStores .Shards ); err != nil {
6767 return nil , err
6868 }
6969 }
7070 return clients , nil
7171}
7272
73- func appendClients (ctx context. Context , clients map [string ]storeapi.StoreApiClient , shards [][]string ) error {
73+ func appendClients (clients map [string ]storeapi.StoreApiClient , shards [][]string ) error {
7474 for _ , shard := range shards {
7575 for _ , replica := range shard {
7676 if _ , has := clients [replica ]; has {
7777 continue
7878 }
7979 // this doesn't block, and if store is down, it will try to reconnect in background
80- conn , err := grpc .DialContext (
81- ctx ,
80+ conn , err := grpc .NewClient (
8281 replica ,
8382 grpc .WithTransportCredentials (insecure .NewCredentials ()),
8483 grpc .WithStatsHandler (& tracing.ClientHandler {}),
@@ -132,7 +131,7 @@ func NewIngestor(config IngestorConfig, store *storeapiclient.Store) (*Ingestor,
132131 config .Bulk .HotStores = stores .NewStoresFromString ("memory" , 1 )
133132 config .Search .HotStores = stores .NewStoresFromString ("memory" , 1 )
134133 } else {
135- clients , err = clientsFromConfig (ctx , config .Search )
134+ clients , err = clientsFromConfig (config .Search )
136135 if err != nil {
137136 cancel ()
138137 return nil , fmt .Errorf ("initialize clients: %s" , err )
0 commit comments