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

[Release-1.30] - Don't dump the full SQL payload when SlowSQLThreshold is exceeded #10501

Closed
brandond opened this issue Jul 11, 2024 · 1 comment
Assignees
Milestone

Comments

@brandond
Copy link
Member

Backport fix for Don't dump the full SQL payload when SlowSQLThreshold is exceeded

@mdrahman-suse
Copy link

Validated with RC v1.30.3-rc1+k3s1

Environment and config

Ubuntu 22.04, Single server
  • /etc/rancher/k3s/config.yaml
write-kubeconfig-mode: 644
token: <token>
node-name: server1

Testing

Replication

$ k3s -v
k3s version v1.30.2+k3s1 (aa4794b3)
go version go1.22.4
  • Logs show expanded data
$ sudo journalctl -u k3s | grep sqlite
Jul 18 18:11:53 server1 k3s[7906]: time="2024-07-18T18:11:53Z" level=info msg="Configuring sqlite3 database connection pooling: maxIdleConns=2, maxOpenConns=0, connMaxLifetime=0s"
$ sudo journalctl -u k3s | grep "Slow SQL"
Jul 18 18:11:59 server1 k3s[7906]: time="2024-07-18T18:11:59Z" level=info msg="Slow SQL (started: 2024-07-18 18:11:57.446659895 +0000 UTC m=+4.316214637) (total time: 1.677823309s): INSERT INTO kine(name, created, deleted, create_revision, prev_revision, lease, value, old_value) values(?, ?, ?, ?, ?, ?, ?, ?) : [[/registry/clusterroles/system:controller:pvc-protection-controller 1 0 0 0 0 [107 ... 0] []]]"

Validation

$ k3s -v
k3s version v1.30.3-rc1+k3s1 (086d9ca0)
go version go1.22.5
  • Logs does not show expanded data (Able to see only once on v1.29.7-rc1)
$ sudo journalctl -u k3s | grep sqlite
Jul 18 18:03:37 server1 k3s[4880]: time="2024-07-18T18:03:37Z" level=info msg="Configuring sqlite3 database connection pooling: maxIdleConns=2, maxOpenConns=0, connMaxLifetime=0s"

$ sudo journalctl -u k3s | grep "Slow SQL"
Jul 18 18:03:43 server1 k3s[4880]: time="2024-07-18T18:03:43Z" level=info msg="Slow SQL (started: 2024-07-18 18:03:41.669334062 +0000 UTC m=+4.266936575) (total time: 1.503118288s): INSERT INTO kine(name, created, deleted, create_revision, prev_revision, lease, value, old_value) values(?, ?, ?, ?, ?, ?, ?, ?)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants