Skip to content

Commit

Permalink
HPCC-32880 Changes following review
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Dec 9, 2024
1 parent 6f2e1fb commit 1453ca6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dali/base/dadfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5006,6 +5006,8 @@ protected: friend class CDistributedFilePart;
}
virtual void getCost(const char * cluster, cost_type & atRestCost, cost_type & accessCost) override
{
atRestCost = 0;
accessCost = 0;
CDateTime dt;
getModificationTime(dt);
double fileAgeDays = difftime(time(nullptr), dt.getSimple())/(24*60*60);
Expand All @@ -5016,7 +5018,6 @@ protected: friend class CDistributedFilePart;
{
StringArray clusterNames;
unsigned countClusters = getClusterNames(clusterNames);
atRestCost = 0;
for (unsigned i = 0; i < countClusters; i++)
atRestCost += calcFileAtRestCost(clusterNames[i], sizeGB, fileAgeDays);
if (countClusters)
Expand Down

0 comments on commit 1453ca6

Please sign in to comment.