mhashlistnode_t *node;
// go through object store;
// track sizes, oids, and num
+// printf("%s -> Before mutex lock\n",__func__);
pthread_mutex_lock(&mlookup.locktable);
+// printf("%s -> After mutex lock\n",__func__);
size =0;
tempsize =0;
- for(i = 0; i < mlookup.size; i++) {
+ for(i = 0; i < mlookup.size; i++) {
if (mlookup.table[i].key != 0) {
node = &mlookup.table[i];
while(node != NULL) { // no nodes
}
}
}
+// printf("%s -> size = %d\n",__func__,size);
pthread_mutex_unlock(&mlookup.locktable);
ptr += sizeof(unsigned int);
*((int *)(ptr)) = size;
ptr += sizeof(int);
- void* ttt = *dupeptr;
for(i = 0; i < numdupe; i++) {
header = mhashSearch(oidsdupe[i]);
}
header->version += 1;
- //printf("oid: %u, new header version: %d\n", oidmod[i], header->version);
if(header->notifylist != NULL) {
#ifdef RECOVERY
if(header->isBackup != 0) // if it is primary obj, notify
#ifdef RECOVERY
void duplicateLostObjects(unsigned int mid){
+ printf("Recovery Start");
+ time_t st = time(NULL);
+ time_t fi;
#ifndef DEBUG
printf("%s-> Start, mid: [%s]\n", __func__, midtoIPString(mid));
#endif
freeSockWithLock(transPrefetchSockPool, backupMid, sd);
}
+ fi = time(NULL);
+
+ printf("time elapse = %d",fi-st);
+
#ifndef DEBUG
printf("%s-> End\n", __func__);
#endif
return -1;
}
ndata->numoid = numoid;
- printf("%s -> ndata = %d numoid = %d\n",__func__,ndata,numoid);
+// printf("%s -> ndata = %d numoid = %d\n",__func__,ndata,numoid);
ndata->threadid = threadid;
ndata->oidarry = oidarry;
ndata->versionarry = versionarry;