Skip to content

Commit

Permalink
Miscellanous cleanups.
Browse files Browse the repository at this point in the history
This PR makes two small cleanups I encountered. First, I deleted a big
stale comment in weavelet.go. Second, I fixed an error log in call.go
that was always printing, regardless of whether there was actually an
error.
  • Loading branch information
mwhittaker committed May 31, 2023
1 parent e3bf5a2 commit 7a6915a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
5 changes: 3 additions & 2 deletions internal/net/call/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,9 @@ func (rc *reconnectingConnection) watchResolver(ctx context.Context, version *Ve
// Resolver wishes to be called again after an appropriate delay.
continue
}
err = rc.updateEndpoints(endpoints)
logError(rc.opts.Logger, "watchResolver", err)
if err := rc.updateEndpoints(endpoints); err != nil {
logError(rc.opts.Logger, "watchResolver", err)
}
version = newVersion
r.Reset()
}
Expand Down
19 changes: 0 additions & 19 deletions weavelet.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,25 +228,6 @@ func (w *weavelet) start() error {
}

w.logRolodexCard()

// Every Service Weaver process launches a watchComponentsToStart goroutine that
// periodically starts components, as needed. Every Service Weaver process can host one or
// more Service Weaver components. The components assigned to a Service Weaver process is predetermined,
// but a component O is started lazily only when O.Get() is called by some
// other component. So, a process may not be running all the components it has been
// assigned. For example, process P may be assigned components X, Y, and Z but
// only running components X and Y.
//
// How does a process know what components to run? Every Service Weaver process notifies
// the runtime about the set of components that should be started. When a component
// A in process PA calls B.Get() for a component B assigned to process PB, A
// notifies the runtime that "B" should start. Process PB watches the set of
// components it should start from the runtime, and starts the new components accordingly.
//
// Note that if a component is started locally (e.g., a component in a process
// calls Get("B") for a component B assigned to the same process), then the
// component's name is also registered with the protos.

return nil
}

Expand Down

0 comments on commit 7a6915a

Please sign in to comment.