Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

universe: improve logging for single asset sync attempt #1294

Merged
merged 1 commit into from
Jan 13, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions universe/auto_syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -846,18 +846,31 @@ func (f *FederationEnvoy) SyncAssetInfo(ctx context.Context,
// Sync failures are expected from Universe servers that do not
// have a relevant universe root.
if err != nil {
log.Debugf("asset lookup for %v failed with remote"+
"server: %v", assetID.String(), addr.HostStr())
//lint:ignore nilerr failure is expected and logged
log.Warnf("Asset lookup failed: asset_id=%v, "+
"remote_server=%v: %v", assetID.String(),
addr.HostStr(), err)

// We don't want to abort syncing here, as this might
// just be one server in our list and returning an error
// would cause us to stop trying the other servers.
// lint:ignore nilerr failure is expected and logged.
return nil
}

// There should only be one sync diff since we're only syncing
// one universe root.
if syncDiff != nil {
if len(syncDiff) != 1 {
log.Debugf("unexpected number of sync diffs: "+
"%v", len(syncDiff))
log.Warnf("Unexpected number of sync diffs "+
"when looking up asset: num_diffs=%d, "+
"asset_id=%v, remote_server=%v",
len(syncDiff), assetID.String(),
addr.HostStr())

// We don't want to abort syncing here, as this
// might just be one server in our list and
// returning an error would cause us to stop
// trying the other servers.
return nil
}

Expand Down
Loading