v1.1b8
parent
4a40b7ec17
commit
f844ece677
|
|
@ -201,6 +201,8 @@ void NormBitmask::Destroy()
|
|||
|
||||
bool NormBitmask::GetNextSet(unsigned long& index) const
|
||||
{
|
||||
//TRACE("NormBitmask::GetNextSet(%lu) first_set:%lu num_bits:%lu\n",
|
||||
// index, first_set, num_bits);
|
||||
if (index >= num_bits) return false;
|
||||
if (index < first_set) return GetFirstSet(index);
|
||||
unsigned long maskIndex = index >> 3;
|
||||
|
|
@ -394,7 +396,7 @@ bool NormBitmask::Subtract(const NormBitmask& b)
|
|||
} // end NormBitmask::Subtract()
|
||||
|
||||
|
||||
// this = ~this & b
|
||||
// this = ~this & b (this = b - this)
|
||||
bool NormBitmask::XCopy(const NormBitmask& b)
|
||||
{
|
||||
if (b.num_bits > num_bits) return false;
|
||||
|
|
@ -411,7 +413,7 @@ bool NormBitmask::XCopy(const NormBitmask& b)
|
|||
else
|
||||
{
|
||||
first_set = b.first_set;
|
||||
GetNextSet(first_set);
|
||||
if (!GetNextSet(first_set)) first_set = num_bits;
|
||||
}
|
||||
return true;
|
||||
} // end NormBitmask::XCopy()
|
||||
|
|
@ -442,7 +444,9 @@ bool NormBitmask::Xor(const NormBitmask& b)
|
|||
for(unsigned int i = 0; i < b.mask_len; i++)
|
||||
mask[i] ^= b.mask[i];
|
||||
if (b.first_set == first_set)
|
||||
GetNextSet(first_set);
|
||||
{
|
||||
if (!GetNextSet(first_set)) first_set = num_bits;
|
||||
}
|
||||
return true;
|
||||
} // end NormBitmask::Xor()
|
||||
|
||||
|
|
|
|||
|
|
@ -554,7 +554,8 @@ void NormServerNode::HandleRepairContent(const char* buffer, UINT16 bufferLen)
|
|||
block = object->FindBlock(nextBlockId);
|
||||
prevBlockId = nextBlockId;
|
||||
}
|
||||
if (block) block->SetRepairs(nextSegmentId,lastSegmentId);
|
||||
if (block)
|
||||
block->SetRepairs(nextSegmentId,lastSegmentId);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
@ -1336,7 +1337,7 @@ bool NormServerNode::OnRepairTimeout(ProtoTimer& /*theTimer*/)
|
|||
else
|
||||
{
|
||||
suppress_count++;
|
||||
DMSG(6, "NormServerNode::OnRepairTimeout() node>%lu NACK SUPPRESSED ...\n",
|
||||
DMSG(4, "NormServerNode::OnRepairTimeout() node>%lu NACK SUPPRESSED ...\n",
|
||||
LocalNodeId());
|
||||
} // end if/else(repairPending)
|
||||
// BACKOFF related code
|
||||
|
|
|
|||
|
|
@ -205,6 +205,7 @@ bool NormBlock::IsRepairPending(UINT16 numData, UINT16 numParity)
|
|||
repair_mask.SetBits(0, numData);
|
||||
repair_mask.SetBits(numData+erasure_count, numParity-erasure_count);
|
||||
}
|
||||
// Calculate repair_mask = pending_mask - repair_mask
|
||||
repair_mask.XCopy(pending_mask);
|
||||
return (repair_mask.IsSet());
|
||||
} // end NormBlock::IsRepairPending()
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@
|
|||
|
||||
#ifndef _NORM_VERSION
|
||||
#define _NORM_VERSION
|
||||
#define VERSION "1.1b7"
|
||||
#define VERSION "1.1b8"
|
||||
#endif // _NORM_VERSION
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue