Skip to content

Commit 754e894

Browse files
committed
improved:Statistics bucket size
1 parent 2d9998b commit 754e894

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

XEngine_Source/StorageModule_APIHelp/APIHelp_Distributed/APIHelp_Distributed.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -333,10 +333,8 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
333333
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_DISABLE;
334334
return false;
335335
}
336-
__int64u nDirCount = 0; //当前目录大小
337-
APIHelp_Api_GetDIRSize(pSt_StorageBucket->tszFilePath, &nDirCount);
338336
//如果当前目录大小大于设定的大小.
339-
if (nDirCount >= APIHelp_Distributed_GetSize(stl_ListIterator->tszBuckSize))
337+
if (pSt_StorageBucket->nBuckSize >= APIHelp_Distributed_GetSize(stl_ListIterator->tszBuckSize))
340338
{
341339
APIHelp_IsErrorOccur = true;
342340
APIHelp_dwErrorCode = ERROR_STORAGE_MODULE_APIHELP_SIZE;
@@ -369,10 +367,8 @@ bool CAPIHelp_Distributed::APIHelp_Distributed_UPStorage(list<XENGINE_STORAGEBUC
369367
//处理优先级
370368
if (stl_ListIterator->nLevel == nLastLevel)
371369
{
372-
__int64u nDirCount = 0; //当前目录大小
373-
APIHelp_Api_GetDIRSize(pSt_StorageBucket->tszFilePath, &nDirCount);
374370
//如果当前目录大小大于设定的大小.那么忽略
375-
if (nDirCount >= APIHelp_Distributed_GetSize(stl_ListIterator->tszBuckSize))
371+
if (pSt_StorageBucket->nBuckSize >= APIHelp_Distributed_GetSize(stl_ListIterator->tszBuckSize))
376372
{
377373
continue;
378374
}

0 commit comments

Comments
 (0)