Commit 9b537b73 authored by Cedric Caffy's avatar Cedric Caffy
Browse files

[cta-statistics] Adapted the statistics to get rid of the superseded columns

parent 767074af
......@@ -77,7 +77,7 @@ void DatabaseStatisticsService::updateStatisticsPerTape(){
"ON "
"TAPE_FILE.ARCHIVE_FILE_ID = ARCHIVE_FILE.ARCHIVE_FILE_ID "
"WHERE "
"TAPE_FILE.SUPERSEDED_BY_VID IS NULL AND TAPE_FILE.SUPERSEDED_BY_FSEQ IS NULL AND TAPE_FILE.VID = TAPE_TO_UPDATE.VID "
"TAPE_FILE.VID = TAPE_TO_UPDATE.VID "
"GROUP BY TAPE_FILE.VID, TAPE_FILE.COPY_NB"
") STATS "
"GROUP BY STATS.VID, STATS.COPY_NB, STATS.NB_FILES, STATS.DATA_IN_BYTES"
......
......@@ -75,7 +75,7 @@ int StatisticsUpdateCmd::exceptionThrowingMain(const int argc, char *const *cons
"NB_COPY_NB_GT_1",
"COPY_NB_GT_1_IN_BYTES"
});
result += catalogueChecker->checkTableContainsColumns("TAPE_FILE",{"VID","ARCHIVE_FILE_ID","FSEQ","COPY_NB","SUPERSEDED_BY_VID","SUPERSEDED_BY_FSEQ"});
result += catalogueChecker->checkTableContainsColumns("TAPE_FILE",{"VID","ARCHIVE_FILE_ID","FSEQ","COPY_NB"});
result += catalogueChecker->checkTableContainsColumns("ARCHIVE_FILE",{"ARCHIVE_FILE_ID","SIZE_IN_BYTES"});
if(result.getStatus() == SchemaCheckerResult::FAILED){
......
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