-
Notifications
You must be signed in to change notification settings - Fork 713
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent flushing nonsuper_connections and Reference count nonsuper_co…
…nnections Summary: nonsuper_connections was getting underflows because it was getting reset during "flush status". In 8.0, the flags should have been updated to SHOW_LONG_NOFLUSH. It is also possible for privileges to be granted/revoked after connection setup, but the nonsuper_connections count were not adjusted appropriately. On cleanup, the new privileges were used to determine if nonsuper_connections needed to be decremented. Improve the robustness of tracking nonsuper_connections references by storing counts in the THD. Allow each THD to increment nonsuper_connections at most once and track nonsuper_connections increments within the THD. Apply the appropriate decrements when the structure is freed or reinitialized. Switching to atomic counters for nonsuper_connections removes the LOCK_user_conn requirements and reduces the risk of deadlocks when cleaning up THD's. Squash with D13987618 Reviewed By: pradeep1288 Differential Revision: D21562003 fbshipit-source-id: 9e4b8eb
- Loading branch information
1 parent
90c25c8
commit ae0d38a
Showing
7 changed files
with
61 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters