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

support Com_delete, Com_insert, Com_update status variables #2427

Merged
merged 9 commits into from
Apr 1, 2024
Merged

Conversation

jycor
Copy link
Contributor

@jycor jycor commented Apr 1, 2024

Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

Looks good!

sql/core.go Outdated
Comment on lines 768 to 778
// TODO: goroutine for speed
if _, globalComDelete, ok := StatusVariables.GetGlobal(name); ok {
if v, isUint64 := globalComDelete.(uint64); isUint64 {
StatusVariables.SetGlobal(name, v+1)
}
}
if sessComDelete, err := ctx.GetStatusVariable(ctx, name); err == nil {
if v, isUint64 := sessComDelete.(uint64); isUint64 {
ctx.SetStatusVariable(ctx, name, v+1)
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we just go ahead and add it while we're in here? The tests may be racey then and need a little pause before checking var values. We could hold off and do a quick perf profile and see how big the difference is, but since this code needs to lock two mutexes, it's probably going to be worth it, especially in an environment with multiple clients and contention on the locks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adding goroutines here:
#2430

@jycor jycor merged commit 947e7c3 into main Apr 1, 2024
7 checks passed
@jycor jycor deleted the james/delete branch April 1, 2024 22:33
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.

2 participants