Skip to content

FTS-1794: FTS support for HTTP Bringonline operation

Joao Pedro Lopes requested to merge tape_rest_api into develop

This merge request implements support for HTTP bring-online operations in FTS.

  1. Extends the StagingOperation struct to include an std::string "staging_metadata" which is retrieved from the DB in the MySqlAPI::getFilesForStaging(..) and MySqlAPI::getAlreadyStartedStaging(..) methods
  2. Introduces a new class HttpStagingContext which extends the StagingContext 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)
  3. Introduces a Factory Method in the StagingContext class responsible for deciding if a StagingContext or HttpStagingContext should be constructed based on the protocol of the SURL used for the context creation. The HttpStagingContext will be created when dav(s) and http(s) SURLS are being used to create a Staging Context object.
  4. In the BringOnlineTask class replaces the gfal2_bring_online_list() method with the new gfal2_bring_online_list_v2() which allows passing staging metadata to gfal
  5. Only move to STARTED state files which will be part of a StagingContext. And only start a BringOnlineTask if the state change was successful. Since the HttpStagingContext 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 to STARTED. Therefore the state update must be done only when we are sure that a given file will belong to a Context and will start a BringOnlineTask
Edited by Mihai Patrascoiu

Merge request reports