fix continuous updating config with same key invalid bug
This commit is contained in:
@@ -253,7 +253,7 @@ int compare_accept_tag(const char *value, const struct rule_tag *accept_tags, si
|
||||
|
||||
struct maat_item *maat_item_new(long long item_id, long long group_id, void *user_data, void (*user_data_free)(void *));
|
||||
|
||||
void maat_item_free(void *user_ctx, void *maat_item);
|
||||
void maat_item_free(void *maat_item);
|
||||
|
||||
struct maat_item_inner *maat_item_inner_new(long long group_id, long long item_id, long long district_id);
|
||||
|
||||
|
||||
@@ -32,12 +32,16 @@ void rcu_hash_set_user_ctx(struct rcu_hash_table *htable, void *user_ctx);
|
||||
void *rcu_hash_get_user_ctx(struct rcu_hash_table *htable);
|
||||
|
||||
/**
|
||||
* @brief just means add to the updating nodes
|
||||
* after call rcu_hash_commit, they become effective nodes
|
||||
* @brief Adding the updating nodes which will become effective nodes after call rcu_hash_commit
|
||||
*
|
||||
* @retval 0(success) -1(failed)
|
||||
*/
|
||||
void rcu_hash_add(struct rcu_hash_table *htable, const char *key, size_t key_len, void *data);
|
||||
int rcu_hash_add(struct rcu_hash_table *htable, const char *key, size_t key_len, void *data);
|
||||
|
||||
void rcu_hash_del(struct rcu_hash_table *htable, const char *key, size_t key_len);
|
||||
/**
|
||||
* @brief Deleting
|
||||
*/
|
||||
int rcu_hash_del(struct rcu_hash_table *htable, const char *key, size_t key_len);
|
||||
|
||||
/**
|
||||
* @brief find in effective nodes
|
||||
@@ -50,8 +54,6 @@ void rcu_hash_del(struct rcu_hash_table *htable, const char *key, size_t key_len
|
||||
*/
|
||||
void *rcu_hash_find(struct rcu_hash_table *htable, const char *key, size_t key_len);
|
||||
|
||||
void *rcu_hash_updating_find(struct rcu_hash_table *htable, const char *key, size_t key_len);
|
||||
|
||||
/**
|
||||
* @brief list all effective nodes
|
||||
*
|
||||
@@ -73,8 +75,6 @@ int rcu_hash_is_updating(struct rcu_hash_table *htable);
|
||||
*/
|
||||
void rcu_hash_commit(struct rcu_hash_table *htable);
|
||||
|
||||
size_t rcu_hash_garbage_queue_len(struct rcu_hash_table *htable);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user