Skip to content

Commit

Permalink
Merge pull request #1030 from abhinavdangeti/curChunkSizeZero
Browse files Browse the repository at this point in the history
[zap cli] Handle case when read chunk is 0 bytes
  • Loading branch information
abhinavdangeti committed Nov 14, 2018
2 parents 71dad20 + 8b0d5dc commit e1f5e6c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/bleve/cmd/zap/docvalue.go
Expand Up @@ -196,6 +196,10 @@ var docvalueCmd = &cobra.Command{
}
curChunkSize := chunkLens[docInChunk]

if curChunkSize == 0 {
return nil
}

// read the number of docs reside in the chunk
numDocs := uint64(0)
numDocs, nread = binary.Uvarint(data[destChunkDataLoc : destChunkDataLoc+binary.MaxVarintLen64])
Expand Down

0 comments on commit e1f5e6c

Please sign in to comment.