Reduce the number of queues fetched in fetchMountInfo
Each tape drive is tied to a single logical library. Therefore there is no need to fetch all queues in OStoreDB::fetchMountInfo(...)
.
We should simply fetch the queues that are associated with the logical library (filter either by tape VID or tape pool name).
TODO:
- Pass
logicalLibraryName
down toOStoreDB::fetchMountInfo(...)
. - Inside
OStoreDB::fetchMountInfo(...)
call two new functions:- Names:
m_catalogue.getCachedTapes(const TapeSearchCriteria &searchCriteria);
m_catalogue.getCachedTapePool(const TapeSearchCriteria &searchCriteria);
- Use the
logicalLibraryName
as a search criteria. - Cache the results:
- The values are not expected to change frequently and we can tolerate inconsistencies for a while...
- Names:
- Use the list of tapes/tape-pools to avoid fetching unnecessary queues from the object store DB.
- Remove the parameter
logicalLibraryName
fromScheduler::sortAndGetTapesForMountInfo(...)
:- With the new logic, this parameter becomes redundant. In addition, we avoid an unnecessary query to the catalogue DB.