Skip to content

Commit

Permalink
[XrdEc] Reader: use bundled close.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Jan 21, 2021
1 parent 0d3ff07 commit 0c7e885
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/XrdCl/XrdClFileStateHandler.cc
Expand Up @@ -712,6 +712,7 @@ namespace XrdCl
pFollowRedirects( true ),
pUseVirtRedirector( true ),
pIsChannelEncrypted( false ),
pAllowBundledClose( false ),
pReOpenHandler( 0 )
{
pFileHandle = new uint8_t[4];
Expand Down
8 changes: 8 additions & 0 deletions src/XrdCl/XrdClZipArchive.hh
Expand Up @@ -274,6 +274,14 @@ namespace XrdCl
return openstage == Done;
}

//-----------------------------------------------------------------------
//! Set property on the underlying File object
//-----------------------------------------------------------------------
inline bool SetProperty( const std::string &name, const std::string &value )
{
return archive.SetProperty( name, value );
}

private:

//-----------------------------------------------------------------------
Expand Down
6 changes: 5 additions & 1 deletion src/XrdEc/XrdEcReader.cc
Expand Up @@ -552,7 +552,11 @@ namespace XrdEc
{
auto &zipptr = itr->second;
if( zipptr->IsOpen() )
closes.emplace_back( XrdCl::CloseArchive( *zipptr ) >> [zipptr]( XrdCl::XRootDStatus& ){ } );
{
zipptr->SetProperty( "BundledClose", "true");
closes.emplace_back( XrdCl::CloseArchive( *zipptr ) >>
[zipptr]( XrdCl::XRootDStatus& ){ } );
}
}

// if there is nothing to close just schedule the handler
Expand Down

0 comments on commit 0c7e885

Please sign in to comment.