I meet an issue about snmpset in SNMPv3.
I have override the commit function of a scalar, add some handling functions there. the handling function will usually cost more than 1 second.
If user use snmpset in SNMPv3 like this：
”snmpset -v3 -u snmpuser2 -l authNoPriv -a sha -A 12345abcde 10.10.20.1 22.214.171.124.4.1.448126.96.36.199.5.2.0 x e4a1e68a2f13“
The request will always fail.
because the user don’t set “-t” and “-r” param of snmpset, it will retry every 1 second as default.
Therefore, when the first try timed out, our handling function has not finished yet. when it finished and snmp4j-agent return response to net-snmp, the second request try is on.
and because the msgID in response is the first try’s, can’t match the second try’s msgID, net-snmp droped this “success” response.
then in third try, because the action can’t do twice in our logic, so we return “fail” response immediately, then the final result showed in net-snmp is “failed”.
In this scenario, if user don’t adjust “-t”, and the handling need take more than 1 second indeed, could Snmp4j-Agent return the response to net-snmp with the msgID in current on-going try?