Fix statseg v2 error index zero id skip 42/36442/3
authorDmitry Valter <d-valter@yandex-team.ru>
Wed, 15 Jun 2022 13:58:16 +0000 (13:58 +0000)
committerNathan Skrzypczak <nathan.skrzypczak@gmail.com>
Mon, 25 Jul 2022 14:21:42 +0000 (14:21 +0000)
Don't skip zero id error counters as it's not a pointer.

Type: fix
Signed-off-by: Dmitry Valter <d-valter@yandex-team.ru>
Change-Id: I907bb9f110d8bf5db6326ae654206ddc83187044

adapter/statsclient/statseg_v2.go

index 1f8aaeb..11a3679 100644 (file)
@@ -94,7 +94,7 @@ func (ss *statSegmentV2) CopyEntryData(segment dirSegment, index uint32) adapter
        dirEntry := (*statSegDirectoryEntryV2)(segment)
        typ := getStatType(dirEntry.directoryType, ss.getErrorVector() != nil)
        // skip zero pointer value
-       if typ != adapter.ScalarIndex && typ != adapter.Empty && dirEntry.unionData == 0 {
+       if typ != adapter.ScalarIndex && typ != adapter.Empty && typ != adapter.ErrorIndex && dirEntry.unionData == 0 {
                debugf("data pointer not defined for %s", dirEntry.name)
                return nil
        }