From f844ece677da1deb2347a4556e6761c4cb01777e Mon Sep 17 00:00:00 2001 From: Jeff Weston Date: Wed, 11 Sep 2019 11:35:29 -0400 Subject: [PATCH] v1.1b8 --- common/normBitmask.cpp | 10 +++++++--- common/normNode.cpp | 5 +++-- common/normSegment.cpp | 1 + common/normVersion.h | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/common/normBitmask.cpp b/common/normBitmask.cpp index ba1040e..54143b0 100644 --- a/common/normBitmask.cpp +++ b/common/normBitmask.cpp @@ -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() diff --git a/common/normNode.cpp b/common/normNode.cpp index d8c1c12..53b10f9 100644 --- a/common/normNode.cpp +++ b/common/normNode.cpp @@ -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 diff --git a/common/normSegment.cpp b/common/normSegment.cpp index 6dbcee0..85d49c7 100644 --- a/common/normSegment.cpp +++ b/common/normSegment.cpp @@ -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() diff --git a/common/normVersion.h b/common/normVersion.h index 0c05746..90497e5 100644 --- a/common/normVersion.h +++ b/common/normVersion.h @@ -32,6 +32,6 @@ #ifndef _NORM_VERSION #define _NORM_VERSION -#define VERSION "1.1b7" +#define VERSION "1.1b8" #endif // _NORM_VERSION