On Wed, Jul 12, 2006 at 10:22:09PM +0800, Michael Li (gmail) wrote:
> Hi, all,
>
> As I know, DMAPI event can be in 2 states:
> 1) enqueued, undelivered
This is sitting on sn_newq.
> 2) delivered and awaiting a response from the DM application.
This is sitting on sn_delq.
> The 2nd state also know as outstanding state for synchronous event
> message. I'd like to know the exact meaning of "delivered",
> Does "delivered" means the DM application had call dm_get_event() on the
> event?
Yes, delivered means the HSM has retrieved it with dm_get_events(). This is
the only place you should see a dm_unlink_event(sn_newq) and a matching
dm_link_event(sn_delq). It doesn't go onto sn_delq unless it's a sync event,
as determined by looking at the ev_token field and you can see that's set in
dm_enqueue() only for sync events.
> Can an event message automatically change state from 1 to 2 when it is
> enqueued?
> Is there a list of the events that will always change state to
> delievered state after it is enqueued?
The "user" event, DM_EVENT_USER. Ug. This is how an HSM can drop a marker
directly into the "delivered" queue. A user event never enters sn_newq. I
supposed an HSM would have multiple sessions, and would be moving events
around between sessions for something...er other. Don't ask me how this event
is used.
Of course, dm_move_event() can pull an event off one session's delq and add it
to another session's delq.
Dean
|