Skip to content

Commit

Permalink
[XrdEc] Mark Recovering stripes as Missing if error correction fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonmichal committed Jan 19, 2021
1 parent 071fbe9 commit 51815fa
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/XrdEc/XrdEcReader.cc
Expand Up @@ -42,6 +42,7 @@
#include <iterator>
#include <numeric>
#include <tuple>
#include <iostream>

namespace XrdEc
{
Expand Down Expand Up @@ -232,7 +233,12 @@ namespace XrdEc
// Check if we can do the recovery at all (if too many stripes are
// missing it wont be possible)
//---------------------------------------------------------------------
if( missingcnt + recoveringcnt > self->objcfg.nbparity ) return false;
if( missingcnt + recoveringcnt > self->objcfg.nbparity )
{
std::for_each( self->state.begin(), self->state.end(),
[]( state_t &s ){ if( s == Recovering ) s = Missing; } );
return false;
}
//---------------------------------------------------------------------
// Check if we can do the recovery right away
//---------------------------------------------------------------------
Expand All @@ -246,6 +252,8 @@ namespace XrdEc
}
catch( const IOError &ex )
{
std::for_each( self->state.begin(), self->state.end(),
[]( state_t &s ){ if( s == Recovering ) s = Missing; } );
return false;
}
//-------------------------------------------------------------------
Expand Down

0 comments on commit 51815fa

Please sign in to comment.