Skip to content

Register builds before recording build history#3726

Merged
tonistiigi merged 1 commit into
moby:masterfrom
aaronlehmann:register-build-earlier
Mar 22, 2023
Merged

Register builds before recording build history#3726
tonistiigi merged 1 commit into
moby:masterfrom
aaronlehmann:register-build-earlier

Conversation

@aaronlehmann
Copy link
Copy Markdown
Collaborator

Recording build history calls into LeaseManager, which can block for several seconds. This can trigger a 3 second timeout in GatewayForwarder while it waits for a build ID to be registered. Longer-term, we should figure out the performance issues in the containerd metadata DB, but this addresses the immediate problems of timeouts that manifest in these error messages:

forwarding Ping: no such job 93oss3bmbagcpq8yokla3921z

}

if !internal {
rec, err1 := s.recordBuildHistory(ctx, id, req, exp, j)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a typo (refactor bug) with this err1/err switch.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for noticing this. Looks like this was present before this PR. I've gone ahead and fixed the check on the next line (which I think is what's intended...).

Recording build history calls into LeaseManager, which can block for
several seconds. This can trigger a 3 second timeout in GatewayForwarder
while it waits for a build ID to be registered.  Longer-term, we should
figure out the performance issues in the containerd metadata DB, but
this addresses the immediate problems of timeouts that manifest in these
error messages:

    forwarding Ping: no such job 93oss3bmbagcpq8yokla3921z

Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
@aaronlehmann aaronlehmann force-pushed the register-build-earlier branch from e73f671 to 396b276 Compare March 17, 2023 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants