Skip to content

Commit

Permalink
refinements
Browse files Browse the repository at this point in the history
  • Loading branch information
majst01 committed Aug 25, 2023
1 parent 6e0e9aa commit 99daca5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cmd/internal/database/meilisearch/meilisearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ func (db *Meilisearch) Upgrade() error {
if err != nil {
return err
}
healthy := db.client.IsHealthy()
if !healthy {
return fmt.Errorf("meilisearch does not report healthiness")
}
db.log.Infow("meilisearch started after upgrade, killing it", "version", v)
return cmd.Process.Signal(syscall.SIGTERM)
}, retry.Attempts(100))
Expand All @@ -214,7 +218,8 @@ func (db *Meilisearch) Upgrade() error {
}
err = g.Wait()
if err != nil {
return fmt.Errorf("database upgrade failed with %w", err)
// sending a TERM signal will always result in a error response.
db.log.Infow("upgrade database terminated but reported an error which can be ignored", "error", err)
}

db.log.Infow("upgrade done and new data in place", "took", time.Since(start))
Expand Down
4 changes: 2 additions & 2 deletions deploy/meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ spec:
name: auditing-meili-meilisearch-environment
- secretRef:
name: metal-auditing-master-key
image: getmeili/meilisearch:v1.2.0
image: getmeili/meilisearch:v1.3.1
imagePullPolicy: IfNotPresent
name: meilisearch
command:
Expand Down Expand Up @@ -89,7 +89,7 @@ spec:
- name: bin-provision
subPath: tini
mountPath: /usr/local/bin/tini
- image: getmeili/meilisearch:v1.2.0
- image: getmeili/meilisearch:v1.3.1
name: backup-restore-sidecar
command:
- tini
Expand Down

0 comments on commit 99daca5

Please sign in to comment.