skip status FDFS_STORAGE_STATUS_DELETED

v6.03_dev
YuQing 2019-11-18 18:34:22 +08:00
parent 132dbc0950
commit afff529a9b
1 changed files with 13 additions and 8 deletions

View File

@ -4710,16 +4710,21 @@ int tracker_mem_add_group_and_storage(TrackerClientInfo *pClientInfo, \
} }
else else
{ {
if (pClientInfo->pGroup->store_path_count != \ if (pClientInfo->pGroup->store_path_count !=
pJoinBody->store_path_count) pJoinBody->store_path_count)
{ {
ppEnd = pClientInfo->pGroup->all_servers + \ ppEnd = pClientInfo->pGroup->all_servers +
pClientInfo->pGroup->count; pClientInfo->pGroup->count;
for (ppServer=pClientInfo->pGroup->all_servers; \ for (ppServer=pClientInfo->pGroup->all_servers;
ppServer<ppEnd; ppServer++) ppServer<ppEnd; ppServer++)
{ {
if ((*ppServer)->store_path_count != \ if ((*ppServer)->status == FDFS_STORAGE_STATUS_DELETED)
pJoinBody->store_path_count) {
continue;
}
if ((*ppServer)->store_path_count !=
pJoinBody->store_path_count)
{ {
break; break;
} }
@ -4727,9 +4732,9 @@ int tracker_mem_add_group_and_storage(TrackerClientInfo *pClientInfo, \
if (ppServer == ppEnd) //all servers are same, adjust if (ppServer == ppEnd) //all servers are same, adjust
{ {
if ((result=tracker_realloc_group_path_mbs( \ if ((result=tracker_realloc_group_path_mbs(
pClientInfo->pGroup, \ pClientInfo->pGroup, pJoinBody->
pJoinBody->store_path_count))!=0) store_path_count)) != 0)
{ {
return result; return result;
} }