Skip to content

The load privilege event is laggy after the workload gone #59400

@tiancaiamao

Description

@tiancaiamao

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

I create 2M users, and the keep 10% of them active, then run

"set password for test = 'xxx'" for all the 2M users

then run

"alter user test%d failed_login_attempts 10" for all the 2M users

...

2. What did you expect to see? (Required)

After the workload gone, I expect tidb server to be idle.

3. What did you see instead (Required)

The CPU is 100%, using up one core handling privilege reload event.

Image Image Image

As we can see, tidb is still receiving privilege reload event from etcd, for a long time after the workload finish ...
And it's using 1 cpu core to handle the privilege reload loop.

4. What is your TiDB version? (Required)

master? I modify some code for testing but the changes are unrelated to this issue.

commit 27365b47b27820152faf79395f6cf1b96eb3031f (HEAD -> master, origin/master, origin/HEAD)
Author: xzhangxian1008 <[email protected]>
Date:   Tue Feb 11 15:35:39 2025 +0800

    executor: fix the incorrect return when hash join encounters error (#59381)
    
    close pingcap/tidb#59377

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions