Skip to content

Commit

Permalink
backport of commit c34cb8e
Browse files Browse the repository at this point in the history
  • Loading branch information
tgross committed Jul 11, 2022
1 parent e2031d0 commit 22a8f7e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .changelog/13658.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
```release-note:improvement
cli: `operator snapshot state` supports `-filter` expressions and stream decompresses snapshots to avoid writing large temporary files
cli: `operator snapshot state` supports `-filter` expressions and avoids writing large temporary files
```
3 changes: 1 addition & 2 deletions helper/raftutil/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ func RestoreFromArchive(archive io.Reader, filter *nomad.FSMFilter) (*state.Stat
meta, err := snapshot.CopySnapshot(archive, w)
if err != nil {
errCh <- fmt.Errorf("failed to read snapshot: %w", err)
}
if meta != nil {
} else {
metaCh <- meta
}
}()
Expand Down
3 changes: 1 addition & 2 deletions nomad/fsm.go
Original file line number Diff line number Diff line change
Expand Up @@ -1490,8 +1490,7 @@ func (n *nomadFSM) restoreImpl(old io.ReadCloser, filter *FSMFilter) error {
/* Handle upgrade paths:
* - Empty maps and slices should be treated as nil to avoid
* un-intended destructive updates in scheduler since we use
* reflect.DeepEqual. Starting Nomad 0.4.1, job submission sanitizes
* the incoming job.
* reflect.DeepEqual. Job submission sanitizes the incoming job.
* - Migrate from old style upgrade stanza that used only a stagger.
*/
job.Canonicalize()
Expand Down

0 comments on commit 22a8f7e

Please sign in to comment.