2020-09-22 06:51:47 +00:00
|
|
|
package searchsvc
|
|
|
|
|
|
|
|
import (
|
2023-04-12 14:01:29 +00:00
|
|
|
"context"
|
2023-08-24 18:44:55 +00:00
|
|
|
"fmt"
|
2023-04-12 14:01:29 +00:00
|
|
|
|
2023-04-12 14:35:10 +00:00
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
2020-12-10 12:26:40 +00:00
|
|
|
"go.uber.org/zap"
|
2020-09-22 06:51:47 +00:00
|
|
|
)
|
|
|
|
|
2023-08-24 18:44:55 +00:00
|
|
|
func (exec *execCtx) executeLocal(ctx context.Context) error {
|
2023-04-12 14:01:29 +00:00
|
|
|
ids, err := exec.svc.localStorage.search(ctx, exec)
|
2020-10-29 17:16:49 +00:00
|
|
|
if err != nil {
|
2024-12-13 08:44:56 +00:00
|
|
|
exec.log.Debug(ctx, logs.SearchLocalOperationFailed, zap.Error(err))
|
2023-08-24 18:44:55 +00:00
|
|
|
return err
|
|
|
|
}
|
2020-09-22 06:51:47 +00:00
|
|
|
|
2023-08-24 18:44:55 +00:00
|
|
|
if err := exec.writeIDList(ids); err != nil {
|
|
|
|
return fmt.Errorf("%s: %w", logs.SearchCouldNotWriteObjectIdentifiers, err)
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|
|
|
|
|
2023-08-24 18:44:55 +00:00
|
|
|
return nil
|
2020-09-22 06:51:47 +00:00
|
|
|
}
|