mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
storage/etcd3: add back missing errcheck
lost in recent refactoring.
This commit is contained in:
@@ -645,6 +645,9 @@ func (s *store) getKeys(ctx context.Context) ([]string, error) {
|
||||
startTime := time.Now()
|
||||
resp, err := s.client.KV.Get(ctx, s.pathPrefix, clientv3.WithPrefix(), clientv3.WithKeysOnly())
|
||||
metrics.RecordEtcdRequest("listOnlyKeys", s.groupResource, err, startTime)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
keys := make([]string, 0, len(resp.Kvs))
|
||||
for _, kv := range resp.Kvs {
|
||||
keys = append(keys, string(kv.Key))
|
||||
|
||||
Reference in New Issue
Block a user