Commit 8b91713c authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Removed DIRTY bit from RdbmsCatalogue::getTapes() method

parent 1f85d70e
......@@ -10690,7 +10690,6 @@ TEST_P(cta_catalogue_CatalogueTest, filesWrittenToTape_1_archive_file_1_tape_cop
ASSERT_EQ(1, tapes.size());
const common::dataStructures::Tape &tape = tapes.front();
ASSERT_EQ(1, tape.lastFSeq);
ASSERT_TRUE(tape.dirty);
}
 
{
......@@ -12505,10 +12504,6 @@ TEST_P(cta_catalogue_CatalogueTest, deleteArchiveFile) {
log::LogContext dummyLc(m_dummyLog);
m_catalogue->deleteArchiveFile("disk_instance", archiveFileId, dummyLc);
for(auto &tape:m_catalogue->getTapes()){
ASSERT_TRUE(tape.dirty);
}
ASSERT_FALSE(m_catalogue->getArchiveFilesItor().hasMore());
}
 
......@@ -14622,7 +14617,6 @@ TEST_P(cta_catalogue_CatalogueTest, reclaimTape_full_lastFSeq_0_no_tape_files) {
ASSERT_FALSE(tape.labelLog);
ASSERT_FALSE(tape.lastReadLog);
ASSERT_FALSE(tape.lastWriteLog);
ASSERT_TRUE(tape.dirty);
 
const common::dataStructures::EntryLog creationLog = tape.creationLog;
ASSERT_EQ(m_admin.username, creationLog.username);
......
......@@ -2368,7 +2368,6 @@ std::list<common::dataStructures::Tape> RdbmsCatalogue::getTapes(rdbms::Conn &co
"TAPE.IS_FULL AS IS_FULL,"
"TAPE.IS_READ_ONLY AS IS_READ_ONLY,"
"TAPE.IS_FROM_CASTOR AS IS_FROM_CASTOR,"
"TAPE.DIRTY AS DIRTY,"
"TAPE.LABEL_DRIVE AS LABEL_DRIVE,"
"TAPE.LABEL_TIME AS LABEL_TIME,"
......@@ -2527,7 +2526,6 @@ std::list<common::dataStructures::Tape> RdbmsCatalogue::getTapes(rdbms::Conn &co
tape.full = rset.columnBool("IS_FULL");
tape.readOnly = rset.columnBool("IS_READ_ONLY");
tape.isFromCastor = rset.columnBool("IS_FROM_CASTOR");
tape.dirty = rset.columnBool("DIRTY");
tape.labelLog = getTapeLogFromRset(rset, "LABEL_DRIVE", "LABEL_TIME");
tape.lastReadLog = getTapeLogFromRset(rset, "LAST_READ_DRIVE", "LAST_READ_TIME");
......@@ -2883,12 +2881,14 @@ void RdbmsCatalogue::resetTapeCounters(rdbms::Conn& conn, const common::dataStru
const char * const sql =
"UPDATE TAPE SET "
"DATA_IN_BYTES = 0,"
"MASTER_DATA_IN_BYTES = 0,"
"LAST_FSEQ = 0,"
"NB_MASTER_FILES = 0,"
"IS_FULL = '0',"
"LAST_UPDATE_USER_NAME = :LAST_UPDATE_USER_NAME,"
"LAST_UPDATE_HOST_NAME = :LAST_UPDATE_HOST_NAME,"
"LAST_UPDATE_TIME = :LAST_UPDATE_TIME,"
"DIRTY = '1' "
"DIRTY = '0' "
"WHERE "
"VID = :VID";
auto stmt = conn.createStmt(sql);
......
......@@ -116,7 +116,6 @@ int TapeLsStream::fillBuffer(XrdSsiPb::OStreamBuffer<Data> *streambuf) {
tape_item->set_write_mount_count(tape.writeMountCount);
tape_item->set_nb_master_files(tape.nbMasterFiles);
tape_item->set_master_data_in_bytes(tape.masterDataInBytes);
tape_item->set_dirty(tape.dirty);
if(tape.labelLog) {
::cta::common::TapeLog * labelLog = tape_item->mutable_label_log();
......
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