From 8b9a0e1d3713a0f13124897c6acc82371a008006 Mon Sep 17 00:00:00 2001 From: Francisco Javier Honduvilla Coto Date: Wed, 3 Aug 2022 11:26:20 +0100 Subject: [PATCH] batch: Fix GetValueBatch when dealing with partial deletion, more context on #162 Signed-off-by: Francisco Javier Honduvilla Coto --- selftest/map-batch/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/selftest/map-batch/main.go b/selftest/map-batch/main.go index d3abade6..de14a9a3 100644 --- a/selftest/map-batch/main.go +++ b/selftest/map-batch/main.go @@ -73,6 +73,13 @@ func main() { } } + // Test batch get value with more elements than we have. + _, err = testerMap.GetValueBatch(unsafe.Pointer(&batchKeys[0]), prevKey, unsafe.Pointer(&nextKey), uint32(len(batchKeys))+100) + if err != nil { + fmt.Fprintf(os.Stderr, "testerMap.GetValueBatch failed: %v", err) + os.Exit(-1) + } + // Test batch lookup and delete. deleteKeys := make([]uint32, 2) nextKey = uint32(0)