X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=adapter%2Fstatsclient%2Fstatseg_v2.go;h=0780248a3c3aa6e965d03899ac50e90fbb9bd09c;hb=refs%2Fchanges%2F03%2F32503%2F3;hp=16f1729257c8806e42ad92e1c75d518a6c240521;hpb=ba6e92d715c59dc71c4e18e66b262d07578d524b;p=govpp.git diff --git a/adapter/statsclient/statseg_v2.go b/adapter/statsclient/statseg_v2.go index 16f1729..0780248 100644 --- a/adapter/statsclient/statseg_v2.go +++ b/adapter/statsclient/statseg_v2.go @@ -92,12 +92,14 @@ func (ss *statSegmentV2) GetEpoch() (int64, bool) { func (ss *statSegmentV2) CopyEntryData(segment dirSegment, index uint32) adapter.Stat { dirEntry := (*statSegDirectoryEntryV2)(segment) - if dirEntry.unionData == 0 { - debugf("data value or pointer not defined for %s", dirEntry.name) + typ := adapter.StatType(dirEntry.directoryType) + // skip zero pointer value + if typ != statDirScalarIndex && typ != statDirEmpty && dirEntry.unionData == 0 { + debugf("data pointer not defined for %s", dirEntry.name) return nil } - switch adapter.StatType(dirEntry.directoryType) { + switch typ { case statDirScalarIndex: return adapter.ScalarStat(dirEntry.unionData)