Commit 13f10d94 authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Corrected the setting of total stats of a Repack Request

parent 6517392e
......@@ -32,7 +32,7 @@ echo "Preparing namespace for the tests"
kubectl -n ${NAMESPACE} cp client_helper.sh client:/root/client_helper.sh
NB_FILES=500
NB_FILES=1000
FILE_SIZE_KB=15
echo
......
......@@ -39,7 +39,7 @@ getFirstVidContainingFiles() {
writeTapeSummary(){
echo "Summary of the content of the tape $1"
kubectl -n ${NAMESPACE} exec ctacli -- cta-admin ta ls -v $1 -h
kubectl -n ${NAMESPACE} exec ctacli -- cta-admin --json ta ls -v $1 | jq
}
executeRepack() {
......
......@@ -237,24 +237,24 @@ uint64_t RepackRequest::getLastExpandedFSeq() {
return m_payload.lastexpandedfseq();
}
void RepackRequest::addFileToRetrieve(const uint64_t nbFilesToRetrieve){
void RepackRequest::setTotalFileToRetrieve(const uint64_t nbFilesToRetrieve){
checkPayloadWritable();
m_payload.set_totalfilestoretrieve(m_payload.totalfilestoretrieve()+nbFilesToRetrieve);
m_payload.set_totalfilestoretrieve(nbFilesToRetrieve);
}
void RepackRequest::addBytesToRetrieve(const uint64_t nbBytesToRetrieve){
void RepackRequest::setTotalBytesToRetrieve(const uint64_t nbBytesToRetrieve){
checkPayloadWritable();
m_payload.set_totalbytestoretrieve(m_payload.totalbytestoretrieve()+nbBytesToRetrieve);
m_payload.set_totalbytestoretrieve(nbBytesToRetrieve);
}
void RepackRequest::addFileToArchive(const uint64_t nbFilesToArchive){
void RepackRequest::setTotalFileToArchive(const uint64_t nbFilesToArchive){
checkPayloadWritable();
m_payload.set_totalfilestoarchive(m_payload.totalfilestoarchive()+nbFilesToArchive);
m_payload.set_totalfilestoarchive(nbFilesToArchive);
}
void RepackRequest::addBytesToArchive(const uint64_t nbBytesToArchive) {
void RepackRequest::setTotalBytesToArchive(const uint64_t nbBytesToArchive) {
checkPayloadWritable();
m_payload.set_totalbytestoarchive(m_payload.totalbytestoarchive()+nbBytesToArchive);
m_payload.set_totalbytestoarchive(nbBytesToArchive);
}
......
......@@ -78,10 +78,10 @@ public:
void setLastExpandedFSeq(uint64_t lastExpandedFSeq);
uint64_t getLastExpandedFSeq();
void addFileToRetrieve(const uint64_t nbFilesToRetrieve);
void addBytesToRetrieve(const uint64_t nbBytesToRetrieve);
void addFileToArchive(const uint64_t nbFilesToArchive);
void addBytesToArchive(const uint64_t nbBytesToArchive);
void setTotalFileToRetrieve(const uint64_t nbFilesToRetrieve);
void setTotalBytesToRetrieve(const uint64_t nbBytesToRetrieve);
void setTotalFileToArchive(const uint64_t nbFilesToArchive);
void setTotalBytesToArchive(const uint64_t nbBytesToArchive);
struct SubrequestStatistics {
uint64_t fSeq;
......
......@@ -2310,10 +2310,10 @@ void OStoreDB::RepackRequest::expandDone() {
void OStoreDB::RepackRequest::setTotalStats(const TotalStatsFiles& stats){
ScopedExclusiveLock rrl(m_repackRequest);
m_repackRequest.fetch();
m_repackRequest.addFileToArchive(stats.totalFilesToArchive);
m_repackRequest.addBytesToArchive(stats.totalBytesToArchive);
m_repackRequest.addFileToRetrieve(stats.totalFilesToRetrieve);
m_repackRequest.addBytesToRetrieve(stats.totalBytesToRetrieve);
m_repackRequest.setTotalFileToArchive(stats.totalFilesToArchive);
m_repackRequest.setTotalBytesToArchive(stats.totalBytesToArchive);
m_repackRequest.setTotalFileToRetrieve(stats.totalFilesToRetrieve);
m_repackRequest.setTotalBytesToRetrieve(stats.totalBytesToRetrieve);
m_repackRequest.commit();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment