Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There's a value
.NonRepeaters
defined in gosnmp.go. The comment on this value is wrong - there is nomax-repeaters
value defined by that RFC, onlymax-repetitions
, which is set by.MaxRepetitions
. In fact, what this attribute is setting is thenon-repeaters
attribute, which is NOT something that makes sense as a global setting - it indicates how many of the oids provided in aGETBULK
request should only have one value fetched, instead of bulk-fetchingmax-repetitions
OIDs starting at that point.In the only place this attribute is used, as part of walk.go, there is exactly one OID being passed in, and the whole point of using
GetBulk
is that we want to fetch more than one value, so in this callnon-repeaters
should always be set to 0; it should not be configurable. Setting it to anything greater than zero simply means thatGetBulk
will now only fetch one value for that OID; if you want that behavior, you should be using.Walk
instead of.BulkWalk
.So as a parameter, its sole behavior is to make
.BulkWalk*
behave unexpectedly badly; it is not something that should exist.