Date: Fri, 18 Nov 2005 14:19:15 GMT From: soc-bushman <soc-bushman@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 86906 for review Message-ID: <200511181419.jAIEJFFP003705@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=86906 Change 86906 by soc-bushman@soc-bushman_stinger on 2005/11/18 14:18:51 huge bugfix in the caching library and some minor bugfixes Affected files ... .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/Makefile#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/Makefile#13 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agent.c#5 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agent.h#5 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/Makefile.inc#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/group.c#5 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/group.h#5 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.c#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.h#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.c#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.h#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.c#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.h#8 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.8#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf.5#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/config.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/config.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/debug.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/debug.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/hashtable.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/log.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/log.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_rs_query.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_rs_query.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_ws_query.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_ws_query.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/parser.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/parser.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/protocol.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/protocol.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/query.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/query.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/singletons.c#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/singletons.h#12 edit .. //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/startup/cached#7 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/Makefile#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/Makefile#13 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agent.c#5 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agent.h#5 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/Makefile.inc#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/group.c#5 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/group.h#5 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.c#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/hosts.h#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.c#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/passwd.h#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.c#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/agents/services.h#8 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.8#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cached.conf.5#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.c#12 (text+ko) ==== @@ -381,6 +381,7 @@ item = policy->get_first_item_func(policy); while ((item != NULL) && (continue_func(entry, item) == 1)) { next_item = policy->get_next_item_func(policy, item); + TRACE_PTR(next_item); connected_item = item->connected_item; policy->remove_item_func(policy, item); @@ -389,20 +390,30 @@ ht_key.key = item->key; ht_key.key_size = item->key_size; + TRACE_POINT(); hash = HASHTABLE_CALCULATE_HASH(cache_ht_, &entry->items, &ht_key); assert(hash >= 0); assert(hash < HASHTABLE_ENTRIES_COUNT(&entry->items)); - + + TRACE_POINT(); ht_item = HASHTABLE_GET_ENTRY(&(entry->items), hash); - ht_item_data = HASHTABLE_ENTRY_FIND(cache_ht_, ht_item, &ht_key); + TRACE_POINT(); + ht_item_data = HASHTABLE_ENTRY_FIND(cache_ht_, ht_item, + &ht_key); assert(ht_item_data != NULL); - HASHTABLE_ENTRY_REMOVE(cache_ht_, ht_item, ht_item_data); + TRACE_POINT(); + TRACE_POINT(); + TRACE_PTR(ht_item_data->key); + TRACE_INT(ht_item_data->key_size); free(ht_item_data->key); + TRACE_POINT(); free(ht_item_data->value); - free(ht_item_data); + TRACE_POINT(); + HASHTABLE_ENTRY_REMOVE(cache_ht_, ht_item, ht_item_data); --entry->items_size; + TRACE_POINT(); policy->destroy_item_func(item); if (connected_item != NULL) { @@ -743,9 +754,9 @@ find_res->fifo_policy_item->creation_time.tv_sec > common_entry->common_params.max_lifetime.tv_sec) { - HASHTABLE_ENTRY_REMOVE(cache_ht_, item, find_res); free(find_res->key); free(find_res->value); + HASHTABLE_ENTRY_REMOVE(cache_ht_, item, find_res); connected_item = find_res->fifo_policy_item->connected_item; @@ -1208,11 +1219,10 @@ common_entry->policies[0], item); + free(ht_item_data->key); + free(ht_item_data->value); HASHTABLE_ENTRY_REMOVE(cache_ht_, ht_item, ht_item_data); - free(ht_item_data->key); - free(ht_item_data->value); - free(ht_item_data); --common_entry->items_size; common_entry->policies[0]->destroy_item_func( ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cachelib.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/cacheplcs.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/config.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/config.h#12 (text+ko) ==== @@ -40,16 +40,16 @@ #define DEFAULT_COMMON_ENTRY_TIMEOUT 10 #define DEFAULT_MP_ENTRY_TIMEOUT 60 -#define DEFAULT_CACHE_HT_SIZE 257 +#define DEFAULT_CACHE_HT_SIZE 1 //257 #define INITIAL_ENTRIES_CAPACITY 8 #define DEFAULT_SOCKET_PATH "/var/run/cached" #define DEFAULT_PIDFILE_PATH "/var/run/cached.pid" -#define DEFAULT_POSITIVE_ELEMENTS_SIZE (2048) +#define DEFAULT_POSITIVE_ELEMENTS_SIZE 1//(2048) #define DEFAULT_POSITIVE_LIFETIME (60 * 60 * 12) -#define DEFAULT_NEGATIVE_ELEMENTS_SIZE (512) +#define DEFAULT_NEGATIVE_ELEMENTS_SIZE 1//(512) #define DEFAULT_NEGATIVE_LIFETIME (60 * 60) #define DEFAULT_MULTIPART_ELEMENTS_SIZE (1024 * 8) ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/debug.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/debug.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/hashtable.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/log.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/log.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_rs_query.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_rs_query.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_ws_query.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/mp_ws_query.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/parser.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/parser.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/protocol.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/protocol.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/query.c#12 (text+ko) ==== @@ -940,7 +940,6 @@ { struct cache_transform_request *transform_request; struct cache_transform_response *transform_response; - struct configuration_entry *config_entry; size_t i, size; TRACE_IN(on_transform_request_process); @@ -976,7 +975,7 @@ goto fin; } - clear_config_entry_part(config_entry, + clear_config_entry_part(qstate->config_entry, qstate->eid_str, qstate->eid_str_length); } break; ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/query.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/singletons.c#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/cached/singletons.h#12 (text+ko) ==== ==== //depot/projects/soc2005/nsswitch_cached/release/cached-0.2/startup/cached#7 (text+ko) ====
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511181419.jAIEJFFP003705>