Changeset 9422
- Timestamp:
- 07/31/12 11:07:59 (10 months ago)
- Files:
-
- 1 modified
-
branches/next0/src/common/sidcache/sidcache.c (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/next0/src/common/sidcache/sidcache.c
r9420 r9422 6 6 7 7 #include "sidcache.h" 8 #include "pvfs2-debug.h" 8 9 #include "gossip.h" 9 #include "pvfs2-debug.h"10 10 11 11 /* Length of string representation of uuid_t */ … … 213 213 if(j == SID_NUM_ATTR) 214 214 { 215 gossip_err("Attribute: %s is an invalid attribute, and it will not be added\n", attrs_strings[i]); 215 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Attribute: %s is an invalid attribute, \ 216 and it will not be added\n", attrs_strings[i]); 216 217 attr_positions[i] = -1; 217 218 valid_attrs_in_file--; … … 300 301 /* Getting the sid's uuid string representation from the input file */ 301 302 fscanf(inpfile, "%s", tmp_sid_str); 302 //uuid_clear(current_sid); 303 303 304 ret = uuid_parse(tmp_sid_str, current_sid); 304 305 if(ret) 305 306 { 306 gossip_err("Error parsing uuid in SID_load_cache_from_file function\n"); 307 /* Skips adding sid to sid cache */ 308 goto bad_sid; 307 309 } 308 310 … … 323 325 324 326 SID_clean_up_SID_cacheval_t(¤t_sid_cacheval); 327 328 bad_sid: 329 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error parsing uuid in SID_load_cache_from_file function\n"); 325 330 } 326 331 … … 405 410 if(ret) 406 411 { 407 gossip_ err("Error getting sid from sid cache : %s\n", db_strerror(ret));412 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error getting sid from sid cache : %s\n", db_strerror(ret)); 408 413 return(ret); 409 414 } … … 435 440 if (ret) 436 441 { 437 gossip_ err("Error retrieving from sid cache\n");442 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error retrieving from sid cache\n"); 438 443 return ret; 439 444 } … … 494 499 if(new_attrs == NULL) 495 500 { 496 gossip_ err("The new attributes passed to SID_update_sid_in_sid_cache is NULL\n");501 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "The new attributes passed to SID_update_sid_in_sid_cache is NULL\n"); 497 502 return(-1); 498 503 } … … 678 683 if(!new_url) 679 684 { 680 gossip_ err("The url passed into SID_update_url_in_sid function is currently NULL\n");685 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "The url passed into SID_update_url_in_sid function is currently NULL\n"); 681 686 return(-1); 682 687 } … … 791 796 if(ret) 792 797 { 793 gossip_ err("Error deleting record from sid cache : %s\n", db_strerror(ret));798 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error deleting record from sid cache : %s\n", db_strerror(ret)); 794 799 return(ret); 795 800 } … … 991 996 if(ret) 992 997 { 993 gossip_ err("Error occurred when closing cursor in SID_dump_sid_cache function: %s\n", db_strerror(ret));998 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error occurred when closing cursor in SID_dump_sid_cache function: %s\n", db_strerror(ret)); 994 999 return(ret); 995 1000 } … … 1024 1029 if (BULK_MIN_SIZE > (size_of_retrieve_kb * KILOBYTE) + (size_of_retrieve_mb * MEGABYTE)) 1025 1030 { 1026 gossip_ err("Size of bulk retrieve buffer must be greater than 8 KB\n");1031 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Size of bulk retrieve buffer must be greater than 8 KB\n"); 1027 1032 return (-1); 1028 1033 } … … 1041 1046 if (output->data == NULL) 1042 1047 { 1043 gossip_ err("Error sizing buffer\n");1048 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error sizing buffer\n"); 1044 1049 return (-1); 1045 1050 } … … 1051 1056 if ((ret = dbp->cursor(dbp, NULL, dbcursorp, DB_CURSOR_BULK)) != 0) { 1052 1057 free(output->data); 1053 gossip_ err("Error creating bulk cursor\n");1058 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error creating bulk cursor\n"); 1054 1059 return (ret); 1055 1060 } … … 1112 1117 if (opaque_p == NULL) 1113 1118 { 1114 gossip_ err("Error cannot fit into write buffer\n");1119 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error cannot fit into write buffer\n"); 1115 1120 break; 1116 1121 } … … 1162 1167 { 1163 1168 int ret = 0; 1164 1165 /* Setting the global bulk next key to zero */1166 SID_zero_dbt(&bulk_next_key, NULL, NULL);1167 1169 1168 1170 /* Setting the opening environement flags */ … … 1224 1226 u_int32_t flags = DB_CREATE; /* Database open flags. Creates the database if 1225 1227 it does not already exist */ 1228 1229 /* Setting the global bulk next key to zero */ 1230 SID_zero_dbt(&bulk_next_key, NULL, NULL); 1226 1231 1227 1232 ret = db_create(dbp, /* Primary database pointer */ … … 1402 1407 if(ret) 1403 1408 { 1404 gossip_ err("Error closing cursor : %s\n", db_strerror(ret));1409 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error closing cursor : %s\n", db_strerror(ret)); 1405 1410 return(ret); 1406 1411 } … … 1436 1441 if(ret) 1437 1442 { 1438 gossip_ err("Error closing attribute database : %s\n", db_strerror(ret));1443 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error closing attribute database : %s\n", db_strerror(ret)); 1439 1444 return(ret); 1440 1445 } … … 1452 1457 if(ret) 1453 1458 { 1454 gossip_ err("Error closing primary database : %s\n", db_strerror(ret));1459 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error closing primary database : %s\n", db_strerror(ret)); 1455 1460 return(ret); 1456 1461 } … … 1466 1471 if(ret) 1467 1472 { 1468 gossip_ err("Error closing environment : %s\n", db_strerror(ret));1473 gossip_debug(GOSSIP_SIDCACHE_DEBUG, "Error closing environment : %s\n", db_strerror(ret)); 1469 1474 return(ret); 1470 1475 }
