Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
8b91713c
Commit
8b91713c
authored
Feb 04, 2020
by
Cedric CAFFY
Browse files
Removed DIRTY bit from RdbmsCatalogue::getTapes() method
parent
1f85d70e
Changes
3
Hide whitespace changes
Inline
Side-by-side
catalogue/CatalogueTest.cpp
View file @
8b91713c
...
...
@@ -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);
...
...
catalogue/RdbmsCatalogue.cpp
View file @
8b91713c
...
...
@@ -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
);
...
...
xroot_plugins/XrdCtaTapeLs.hpp
View file @
8b91713c
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment