Re: MODE_SET_*

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Mon, 2005-10-17 at 18:42 +0200, Roman Medina-Heigl Hernandez wrote:
>                        I missed the part that "a SET request can set
> several variables, not only one". Then it is some kind of attempt to
> reach a pseudo-atomic operation

Exactly.

>  (which never gets really true since COMMIT may unexpectedly fail).

But there is a responsibility on you (as a MIB developer) to take
every care that it does not!
   If applying an assignment could realistically fail, then you
should be doing this during the ACTION pass, and be ready to
reverse it in the UNDO pass.

If you're simply updating some internal variables - that's probably
safe enough to do in the COMMIT pass.  And there are some situations
where reversing an assignment is likely to be more unreliable than
acting on it in the first place.  In which case COMMIT is probably the
least worst option.

But if acting on an assignment can potentially fail, and it's realistic
to reverse it, then this should be handled in the ACTION/UNDO passes.
Yes, this is more work than COMMIT-based handling, but laziness is no
excuse for irresponsibility :-)


Dave


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.