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

Fix invocation of deferred function for loading schema. #5271

Merged
merged 1 commit into from
Oct 11, 2019

Conversation

dasl-
Copy link
Member

@dasl- dasl- commented Oct 7, 2019

Golang's defer's arguments are evaluated immediately. Thus the time.Since(start) was being resolved immediately, rather than at the end of function execution.

FYI this changes the times shown in the logs from a few nanoseconds to a few milliseconds in a small test setup.

@dasl- dasl- requested a review from sougou as a code owner October 7, 2019 20:31
Golang's defer's arguments are evaluated immediately. Thus the time.Since(start) was being resolved immediately, rather than at the end of function execution.

Signed-off-by: dleibovic <dleibovic@etsy.com>
@sougou sougou merged commit 23efa41 into vitessio:master Oct 11, 2019
systay pushed a commit that referenced this pull request Jul 22, 2024
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