Skip to content

Commit

Permalink
fix not persisting instanceID
Browse files Browse the repository at this point in the history
  • Loading branch information
wdbaruni committed Sep 25, 2024
1 parent 050ea86 commit c8ebc75
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/repo/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func (fsr *FsRepo) Open() error {
if instanceID := fsr.InstanceID(); instanceID == "" {
// this case will happen when a user migrated from a repo prior to instanceID existing.
if err := fsr.writeInstanceID(GenerateInstanceID()); err != nil {
log.Trace().Err(err).Msgf("failed to write instanceID")
log.Debug().Err(err).Msgf("failed to write instanceID")
}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/repo/sysmeta.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (fsr *FsRepo) MustInstanceID() (string, error) {
// writeInstanceID updates the InstanceID in the metadata.
// It fails if the metadata file doesn't exist.
func (fsr *FsRepo) writeInstanceID(id string) error {
return fsr.updateExistingMetadata(func(sysmeta *SystemMetadata) {
return fsr.updateOrCreateMetadata(func(sysmeta *SystemMetadata) {
sysmeta.InstanceID = id
})
}
Expand Down

0 comments on commit c8ebc75

Please sign in to comment.