Update tracker_service.c

避免在多个store_path场景,如果store_path1达到阈值,则永远上传到store_path0的问题
pull/662/head
Wang Jingkai 2023-09-25 16:36:54 +08:00 committed by GitHub
parent 7c58b147ca
commit 40a60c692b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 2 deletions

View File

@ -2681,8 +2681,12 @@ static int tracker_deal_service_query_storage( \
path_total_mbs[write_path_index], pStorageServer-> \
path_free_mbs[write_path_index], avg_reserved_mb))
{
int i;
for (i=0; i<pStoreGroup->store_path_count; i++)
int i, t;
t = write_path_index + 1;
if (t >= pStoreGroup->store_path_count) {
t = 0;
}
for (i=t; i<pStoreGroup->store_path_count; i++)
{
if (tracker_check_reserved_space_path( \
pStorageServer->path_total_mbs[i], \