FTS-1794: FTS support for HTTP Bringonline operation
This merge request implements support for HTTP bring-online operations in FTS.
- Extends the
StagingOperation
struct to include anstd::string "staging_metadata"
which is retrieved from the DB in theMySqlAPI::getFilesForStaging(..)
andMySqlAPI::getAlreadyStartedStaging(..)
methods - Introduces a new class
HttpStagingContext
which extends theStagingContext
class. The main novelty of this new class is that it does not allow duplicate urls to be part of the same context. (This is a requirement from the new HTTP Tape REST API as explained in FTS-1794) - Introduces a Factory Method in the
StagingContext
class responsible for deciding if aStagingContext
orHttpStagingContext
should be constructed based on the protocol of the SURL used for the context creation. TheHttpStagingContext
will be created when dav(s) and http(s) SURLS are being used to create a Staging Context object. - In the
BringOnlineTask
class replaces thegfal2_bring_online_list()
method with the newgfal2_bring_online_list_v2()
which allows passing staging metadata togfal
- Only move to
STARTED
state files which will be part of aStagingContext
. And only start aBringOnlineTask
if the state change was successful. Since theHttpStagingContext
does not allow duplicate urls to be part of the same context we must make sure that only the files which are part of a context have their state updated toSTARTED
. Therefore the state update must be done only when we are sure that a given file will belong to a Context and will start aBringOnlineTask
Edited by Mihai Patrascoiu