Skip to content

Commit 176fde0

Browse files
committed
Bug#27492122 SHUTDOWN HANG WHEN FIREWALL HAS MORE THAN 250K RULES
Problem ======= Deletion of 250k elements from the hash takes very long time. Analysis ======== Elements are removed from the hash using its synchronization feature, where this is not required. All elements are removed in two scenarios: - Firewall shutdown - set_firewall_mode UDF is called. Exclusive access is guaranteed by the rwlock: WR_lock lock(&fw_users_lock). Fix === Native destructor hash feature is used, which clears all elements on hash destroy (lf_hash_destroy). Are elements are destroyed within a second. Reviewed-by =========== Kristofer Alvring <[email protected]> Georgi Kodinov <[email protected]> Marc Alff <[email protected]>
1 parent 078fc08 commit 176fde0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/lf.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
1+
/* Copyright (c) 2007, 2018, Oracle and/or its affiliates. All rights reserved.
22
33
This program is free software; you can redistribute it and/or modify
44
it under the terms of the GNU General Public License as published by
@@ -149,7 +149,7 @@ typedef void lf_hash_init_func(uchar *dst, const uchar* src);
149149
#define LF_HASH_UNIQUE 1
150150

151151
/* lf_hash overhead per element (that is, sizeof(LF_SLIST) */
152-
extern const int LF_HASH_OVERHEAD;
152+
extern MYSQL_PLUGIN_IMPORT const int LF_HASH_OVERHEAD;
153153

154154
typedef struct st_lf_hash {
155155
LF_DYNARRAY array; /* hash itself */

0 commit comments

Comments
 (0)