Commit e4c38d9d authored by Cedric Caffy's avatar Cedric Caffy
Browse files

[cta-admin] Removed --showsuperseded option from the cta-admin tapefile ls command

parent 0254a404
......@@ -598,7 +598,7 @@ public:
/**
* Returns the number of any files contained in the tape identified by its vid
* @param vid the vid in which we will count non superseded files
* @param vid the vid in which we will the number of files
* @return the number of files on the tape
*/
virtual uint64_t getNbFilesOnTape(const std::string &vid) const = 0 ;
......
......@@ -9164,7 +9164,7 @@ TEST_P(cta_catalogue_CatalogueTest, prepareToRetrieveFileUsingArchiveFileId_retu
file1Written.tapeDrive = tapeDrive;
m_catalogue->filesWrittenToTape(file1WrittenSet);
 
//Create a superseded file
//Create a superseder file
auto file2WrittenUP=cta::make_unique<cta::catalogue::TapeFileWritten>();
auto & file2Written = *file2WrittenUP;
std::set<cta::catalogue::TapeItemWrittenPointer> file2WrittenSet;
......@@ -9749,9 +9749,7 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_many_archive_files) {
}
}
 
// Look at all files on tape 1 with "show superseded" on even though there
// aren't any. This is just check for syntax errors in the underlying
// SELECT statement.
// Look at all files on tape 1
{
catalogue::TapeFileSearchCriteria searchCriteria;
searchCriteria.vid = tape1.vid;
......
......@@ -7913,7 +7913,7 @@ std::unique_ptr<common::dataStructures::ArchiveFile> RdbmsCatalogue::getArchiveF
archiveFile->reconciliationTime = rset.columnUint64("RECONCILIATION_TIME");
}
// If there is a tape file that is active i.e non superseded by another file, we add it to the archiveFile's list of tape files
// If there is a tape file we add it to the archiveFile's list of tape files
if(!rset.columnIsNull("VID")) {
// Add the tape file to the archive file's in-memory structure
common::dataStructures::TapeFile tapeFile;
......
......@@ -539,7 +539,7 @@ public:
/**
* Returns the number of any files contained in the tape identified by its vid
* @param vid the vid in which we will count non superseded files
* @param vid the vid in which we will count the number of files
* @return the number of files on the tape
*/
uint64_t getNbFilesOnTape(const std::string &vid) const override;
......@@ -547,7 +547,7 @@ public:
/**
* Returns the number of any files contained in the tape identified by its vid
* @param conn the database connection
* @param vid the vid in which we will count non superseded files
* @param vid the vid in which we will count the number of files
* @return the number of files on the tape
*/
uint64_t getNbFilesOnTape(rdbms::Conn &conn, const std::string &vid) const;
......
......@@ -41,7 +41,6 @@ public:
* @param log Object representing the API to the CTA logging system.
* @param connPool The database connection pool.
* @param vid The volume identifier of the tape.
* @param showSuperseded Include superseded files in the output?
*/
RdbmsCatalogueTapeContentsItor(
log::Logger &log,
......
......@@ -262,7 +262,6 @@ const std::map<std::string, OptionBoolean::Key> boolOptions = {
{ "--log", OptionBoolean::SHOW_LOG_ENTRIES },
{ "--lookupnamespace", OptionBoolean::LOOKUP_NAMESPACE },
{ "--summary", OptionBoolean::SUMMARY },
{ "--showsuperseded", OptionBoolean::SHOW_SUPERSEDED },
{ "--no-recall", OptionBoolean::NO_RECALL }
};
......@@ -471,7 +470,6 @@ const Option opt_refresh_interval { Option::OPT_UINT, "--refreshinterval",
const Option opt_targeted_free_space { Option::OPT_UINT, "--targetedfreespace", "-f", " <targeted_free_space>" };
const Option opt_sleep_time { Option::OPT_UINT, "--sleeptime", "-s", " <sleep time in s>" };
const Option opt_reason { Option::OPT_STR, "--reason", "-r", " <reason_status_change>" };
const Option opt_show_superseded { Option::OPT_FLAG, "--showsuperseded", "-s", "" };
const Option opt_no_recall { Option::OPT_FLAG, "--no-recall", "-nr", "" };
const Option opt_object_id { Option::OPT_STR, "--objectid", "-o", " <objectId>" };
......@@ -573,7 +571,7 @@ const std::map<cmd_key_t, cmd_val_t> cmdOptions = {
/*----------------------------------------------------------------------------------------------------*/
{{ AdminCmd::CMD_TAPEFILE, AdminCmd::SUBCMD_LS },
{ opt_vid.optional(), opt_instance.optional(), opt_fid.optional(), opt_fidfile.optional(),
opt_show_superseded.optional(), opt_lookupns.optional(), opt_archivefileid.optional() }},
opt_lookupns.optional(), opt_archivefileid.optional() }},
/*----------------------------------------------------------------------------------------------------*/
{{ AdminCmd::CMD_TAPEPOOL, AdminCmd::SUBCMD_ADD },
{ opt_tapepool_alias, opt_vo, opt_partialtapes, opt_encrypted, opt_supply.optional(), opt_comment }},
......
......@@ -858,8 +858,6 @@ void TextFormatter::printTapeFileLsHeader() {
"owner",
"group",
"creation time",
"ss vid", // superseded
"ss fseq",
"path"
);
}
......@@ -894,8 +892,6 @@ void TextFormatter::print(const TapeFileLsItem &tfls_item) {
tfls_item.df().owner_id().uid(),
tfls_item.df().owner_id().gid(),
timeToStr(tfls_item.af().creation_time()),
tfls_item.tf().superseded_by_vid(),
tfls_item.tf().superseded_by_f_seq(),
tfls_item.df().path()
);
}
......
......@@ -45,7 +45,7 @@ kubectl -n ${NAMESPACE} exec client -- bash /root/simple_client_ar.sh || exit 1
kubectl -n ${NAMESPACE} cp grep_xrdlog_mgm_for_error.sh ctaeos:/root/grep_xrdlog_mgm_for_error.sh
kubectl -n ${NAMESPACE} exec ctaeos -- bash /root/grep_xrdlog_mgm_for_error.sh || exit 1
NB_FILES=10000
NB_FILES=50
FILE_SIZE_KB=15
echo
......@@ -55,7 +55,7 @@ echo " Archiving files: xrdcp as user1"
echo " Retrieving them as poweruser1"
kubectl -n ${NAMESPACE} cp client_ar.sh client:/root/client_ar.sh
kubectl -n ${NAMESPACE} cp client_ar_abortPrepare.py client:/root/client_abortPrepare.sh
kubectl -n ${NAMESPACE} exec client -- bash /root/client_ar.sh -n ${NB_FILES} -s ${FILE_SIZE_KB} -p 100 -d /eos/ctaeos/preprod -v -r || exit 1
kubectl -n ${NAMESPACE} exec client -- bash /root/client_ar.sh -n ${NB_FILES} -s ${FILE_SIZE_KB} -p 100 -d /eos/ctaeos/preprod -v -A || exit 1
kubectl -n ${NAMESPACE} exec ctaeos -- bash /root/grep_xrdlog_mgm_for_error.sh || exit 1
......
......@@ -538,8 +538,6 @@ void Scheduler::expandRepackRequest(std::unique_ptr<RepackRequest>& repackReques
// If not, we will ensure the subrequest is filed under the lowest fSeq existing on this tape.
// This will prevent double subrequest creation (we already have such a mechanism in case of crash and
// restart of expansion.
//We want to Archive the "active" copies on the tape, thus the copies that are not superseded by another
//we want to Retrieve the "active" fSeq
totalStatsFile.totalFilesToArchive += 1;
totalStatsFile.totalBytesToArchive += retrieveSubRequest.archiveFile.fileSize;
retrieveSubRequest.copyNbsToRearchive.insert(tc.copyNb);
......
......@@ -131,8 +131,6 @@ int ArchiveFileLsStream::fillBuffer(XrdSsiPb::OStreamBuffer<Data> *streambuf) {
tf->set_vid(jt->vid);
tf->set_f_seq(jt->fSeq);
tf->set_block_id(jt->blockId);
tf->set_superseded_by_vid(jt->supersededByVid);
tf->set_superseded_by_f_seq(jt->supersededByFSeq);
record.mutable_afls_item()->set_copy_nb(jt->copyNb);
// is_buffer_full is set to true when we have one full block of data in the buffer, i.e.
......
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