OTP SNMP agent

Martin Bjorklund mbj@REDACTED
Mon Aug 16 09:12:27 CEST 1999


Chandrashekhar <eeicmui@REDACTED> wrote:
> Hi,
> 
>   I have a doubt about the Atomic SET transaction mechanism
>   in the SNMP agent.
>   Suppose I want to modify multiple rows in a single 
>   SET request. I then must write is_set_ok, and undo
>   operations for this table, right?

Right.  But unless the is_set_ok function modifies some state, you
don't need the undo function.

>   The sequence will be:
>     * For each row call is_set_ok.
>     * If any one of them returns {error, Column}, then call
>       undo for each of the previous ones and return error to Manager.
>     * If all succeed, return success.
> 
>   Pls. let me know if I'm correct.

This is correct.

However, there is an (undocumented) feature you can use to change this
behaviour.  Which SET transaction mechanism to use is configurable -
you can write your own set mechanism if you don't like the default
one.  Check the code for details.


/martin



More information about the erlang-questions mailing list