https://wiki.vmssoftware.com/index.php?title=$ACK_EVENT&feed=atom&action=history$ACK EVENT - Revision history2024-03-28T14:17:56ZRevision history for this page on the wikiMediaWiki 1.31.0https://wiki.vmssoftware.com/index.php?title=$ACK_EVENT&diff=1556&oldid=prevJane.doe at 12:45, 28 November 20192019-11-28T12:45:02Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class="diff-marker" />
<col class="diff-content" />
<col class="diff-marker" />
<col class="diff-content" />
<tr class="diff-title" lang="en">
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">← Older revision</td>
<td colspan="2" style="background-color: #fff; color: #222; text-align: center;">Revision as of 12:45, 28 November 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l366" >Line 366:</td>
<td colspan="2" class="diff-lineno">Line 366:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$TRANS_EVENT]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$TRANS_EVENT]]</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$TRANS_EVENT]]</div></td><td class='diff-marker'> </td><td style="background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;"><div>* [[$TRANS_EVENT]]</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">[[Category:System Services]]</ins></div></td></tr>
</table>Jane.doehttps://wiki.vmssoftware.com/index.php?title=$ACK_EVENT&diff=1186&oldid=prevDarya.zelenina: Created page with "'''$ACK_EVENT''', or '''Acknowledge Event''', is a system service that acknowledges an event reported to a Resource Manager (RM) participant or Resource Man..."2019-07-15T17:10:01Z<p>Created page with "'''$ACK_EVENT''', or '''Acknowledge Event''', is a <a href="/System_Service" title="System Service">system service</a> that acknowledges an event reported to a Resource Manager (RM) participant or Resource Man..."</p>
<p><b>New page</b></p><div>'''$ACK_EVENT''', or '''Acknowledge Event''', is a [[System Service|system service]] that acknowledges an event reported to a Resource Manager (RM) participant or Resource Manager instance (RMI).<br />
<br />
=Description=<br />
<br />
The $ACK_EVENT system service:<br />
* Acknowledges an event report delivered by the DECdtm transaction manager to an RM participant or RMI in the calling process.<br />
<br />
Every event report delivered by the DECdtm transaction manager to an RM participant or RMI must be acknowledged by a call to $ACK_EVENT specifying the identifier of the event report. This acknowledgment need not come from AST context. The caller of $ACK_EVENT must be in the same access mode as, or a more privileged access mode than, that in which the event handler AST was delivered.<br />
<br />
The DECdtm transaction manager may deliver multiple event reports to an RMI, but delivers only one event report at a time to an RM participant. For example, if a prepare event report has been delivered to an RM participant, and the transaction is aborted while the RM participant is doing its prepare processing, then the DECdtm transaction manager does not deliver an abort event report to that RM participant until it has acknowledged the prepare event report by a call to $ACK_EVENT.<br />
<br />
After acknowledging the event report, the RMI or RM participant should no longer access the event report block.<br />
<br />
* Adds a new RM participant to a transaction, if the event being acknowledged is of type Transaction Started and the value of the report_reply argument is SS$_NORMAL.<br />
<br />
Note that the new RM participant cannot be the coordinator of the transaction.<br />
<br />
* Removes an RM participant from a transaction if the event being acknowledged is one of the events listed in the following table and the report_reply argument is as listed in this table:<br />
<br />
{| class="wikitable"<br />
! colspan="col" | Event<br />
! colspan-"col" | report_reply<br />
|-<br />
| Abort <br />
| SS$_FORGET<br />
|-<br />
| Commit <br />
| SS$_FORGET or SS$_REMEMBER<br />
|-<br />
| Prepare <br />
| SS$_FORGET or SS$_VETO<br />
|-<br />
| One-phase commit <br />
| SS$_NORMAL or SS$_VETO<br />
|}<br />
<br />
=Syntax=<br />
<nowiki>SYS$ACK_EVENT [</nowiki>[[#flags|flags]]<nowiki>] ,</nowiki>[[#report_id|report_id]]<nowiki> ,</nowiki>[[#report_reply|report_reply]]<nowiki> [,[</nowiki>[[#reason|reason]]<nowiki>] ,[</nowiki>[[#beftime|beftime]]<nowiki>] ,[</nowiki>[[#afttime|afttime]]<nowiki>]<br />
,[</nowiki>[[#part_name|part_name]]<nowiki>] ,[</nowiki>[[#rm_context|rm_context]]<nowiki>], [</nowiki>[[#timout|timout]]<nowiki>]]</nowiki><br />
<br />
C Prototype<br />
<br />
int sys$ack_event (unsigned int flags, unsigned int report_id, int report_reply,...);<br />
<br />
=Arguments=<br />
<br />
==flags==<br />
{{SyservArgument|mask_longword|longword (unsigned)|read only|by value}}<br />
<br />
Reserved to VSI. This argument must be zero.<br />
<br />
==report_id==<br />
{{SyservArgument|identifier|longword (unsigned)|read only|by value}}<br />
<br />
The identifier of the event report being acknowledged by this call to $ACK_EVENT.<br />
<br />
==report_reply==<br />
{{SyservArgument|cond_value|longword (unsigned)|read only|by value}}<br />
<br />
Acknowledgment code appropriate to the event being acknowledged by this call to $ACK_EVENT. The following tables give the valid acknowledgment codes for the various events. The title of each table gives the event, and in brackets, its event code. The event code is passed in the event report block (see $DECLARE_RM).<br />
Acknowledgment of prepare or one-phase commit events gives a vote on the outcome of the transaction—either to commit or to abort. The tables for these<br />
events have a column labeled "Vote". A "yes" vote means that the RM participant<br />
wants to commit the transaction, while a "no" vote means that the RM participant cannot commit. The transaction will be committed only if all participants vote "yes".<br />
<br />
===Replies to an Abort Event Report (DDTM$K_ABORT)===<br />
{| class="wikitable"<br />
! colspan="col" | report_reply <br />
! colspan="col" | Description<br />
|-<br />
| SS$_FORGET <br />
| RM participant guarantees that the effects of its transaction operations will never be detected by any transaction that commits.<br />
'''Side effects:'''<br />
On successful completion of the call to $ACK_EVENT, the RM participant is removed from the transaction, and the ASTLM quota consumed by the call to $JOIN_RM or $ACK_EVENT that added it to the transaction is returned.<br />
DECdtm also releases any application threads that are waiting for the transaction to end (necessary but not sufficient condition). Any call to $END_TRANS, $END_BRANCH, or $ABORT_TRANS on a node for a transaction whose outcome is abort is not allowed to complete until after all abort event reports delivered to RM participants on that node have been acknowledged.<br />
|}<br />
<br />
===Replies to a Commit Event Report (DDTM$K_COMMIT)===<br />
{| class="wikitable"<br />
! colspan="col" | report_reply <br />
! colspan="col" | Description<br />
|-<br />
| SS$_FORGET <br />
| Allows the DECdtm transaction manager to forget the RM participant.<br />
The RM participant must not give this reply until it has either:<br />
* Completed the commit processing for its transaction operations.<br />
* Safely stored enough information to ensure that this commit processing will inevitably complete (for example, logged that the transaction has committed in a private log).<br />
If the RM participant is associated with a nonvolatile RMI, then at some point after receiving this reply, the DECdtm transaction manager will delete the name of the RM participant from the transaction database. After SS$_FORGET replies have been given for all the RM participants in a transaction, that transaction ceases to be recoverable (some time after all these replies are given, the transaction is deleted from the transaction database). A subsequent call to<br />
$GETDTI can lead the resource manager to wrongly assume that the transaction had aborted.<br />
If there is a failure after this reply is sent, a recoverable resource manager must be able to rely on its own safely stored information to determine if any of the commit processing associated with the RM participant needs to be restarted.<br />
'''Side effects:'''<br />
On successful completion of the call to $ACK_EVENT, the RM participant is removed from the transaction, and the ASTLM quota consumed by the call to $JOIN_RM or $ACK_EVENT that added it to the transaction is returned.<br />
DECdtm also releases any application threads that are waiting for the transaction to end (necessary but not sufficient condition). Any call to $END_TRANS or $END_BRANCH on a node for a transaction whose outcome is commit cannot complete successfully until all commit event reports delivered to RM participants on that node have been acknowledged.<br />
|-<br />
| SS$_REMEMBER<br />
| The RM participant requires that the DECdtm transaction manager stores its name and the outcome of the transaction (commit) in the transaction database. Note that for an RM participant associated with a volatile RMI, SS$_REMEMBER<br />
is treated in the same way as SS$_FORGET.<br />
'''Side effects:'''<br />
On successful completion of the call to $ACK_EVENT, the RM participant is removed from the transaction, and the ASTLM quota consumed by the call to $JOIN_RM or $ACK_EVENT that added it to the transaction is returned.<br />
DECdtm also releases any application threads that are waiting for the transaction to end (necessary but not sufficient condition). Any call to $END_TRANS or $END_BRANCH on a node for a transaction whose outcome is commit cannot complete successfully until all commit event reports delivered to RM participants on that node have been acknowledged.<br />
|}<br />
<br />
===Replies to a One-phase Commit Event Report (DDTM$K_ONE_PHASE_COMMIT)===<br />
{| class="wikitable"<br />
! colspan="col" | report_reply <br />
! colspan="col" | Vote<br />
! colspan="col" | Meaning<br />
|-<br />
| SS$_NORMAL <br />
| Yes <br />
| The RM participant decided to commit the transaction, and has safely stored enough information to be able to keep this guarantee even if there is a recoverable failure, caused, for example, by a node crash.<br />
The DECdtm transaction manager does not log any information about the transaction.<br />
'''Side effects:'''<br />
On successful completion of the call to $ACK_EVENT, the RM participant is removed from the transaction, the transaction is ended, and the ASTLM quota consumed by the call to $JOIN_RM or $ACK_EVENT that added the RM participant to the transaction is returned.<br />
DECdtm also allows the call to $END_TRANS to complete (necessary and sufficient condition).<br />
|-<br />
| SS$_PREPARED <br />
| Yes <br />
| RM participant decided not to accept the opportunity to decide the outcome of the transaction. It has performed only prepare processing for the transaction and requires full two-phase commit processing. This is equivalent to voting SS$_PREPARED on a prepare event.<br />
The RM participant can either commit or abort the operations of the transaction, and guarantees that it will abide by the DECdtm transaction manager decision on whether the transaction (and therefore these operations) are committed or aborted.<br />
A recoverable resource manager must not give this vote until it has safely stored enough information to be able to keep this guarantee even if there is a<br />
recoverable failure, caused, for example, by a node crash.<br />
The DECdtm transaction manager will decide the outcome of the transaction, then inform the resource manager of the decision with a commit or abort event report delivered to the RM participant (assuming that it is associated with an RMI that requested these event reports).<br />
Note that an application or other failure can cause the DECdtm transaction manager to decide to abort the transaction.<br />
|-<br />
| SS$_VETO <br />
| No <br />
| RM participant requires that the transaction be aborted and guarantees that the effects of that transaction on its resources will never be detected by any transaction that commits. The reason argument gives the reason why the RM participant is aborting the transaction.<br />
The DECdtm transaction manager does not log any information about the transaction.<br />
'''Side effects:'''<br />
On successful completion of the call to $ACK_EVENT, the RM participant is removed from the transaction, the transaction is ended, and the ASTLM quota consumed by the call to $JOIN_RM or $ACK_EVENT that added the RM participant to the transaction is returned.<br />
DECdtm also allows the call to $END_TRANS to complete (necessary and sufficient condition).<br />
|}<br />
<br />
===Replies to a Prepare Event Report (DDTM$K_PREPARE)===<br />
{| class="wikitable"<br />
! colspan="col" | report_reply <br />
! colspan="col" | Vote<br />
! colspan="col" | Meaning<br />
|-<br />
| SS$_FORGET <br />
| Yes <br />
| This is called a read-only vote. It is an optimization that allows an RM participant to vote "yes" and not receive a commit or abort event report.<br />
'''Side effects:'''<br />
On successful completion of the call to $ACK_EVENT, the RM participant is removed from the transaction, and the ASTLM quota consumed by the call to $JOIN_RM or $ACK_EVENT that added it to the transaction is returned.<br />
|-<br />
| SS$_PREPARED <br />
| Yes <br />
| The RM participant can either commit or abort the operations of the transaction, and guarantees that it will abide by the DECdtm transaction manager's decision on whether the transaction (and therefore these operations) are committed or aborted. In other words, the RM participant guarantees that the behavior of its resources will never be inconsistent with that decision, insofar as that behavior is detected by any transactions that commit.<br />
A recoverable resource manager must not give this vote until it has safely stored enough information to be able to keep this guarantee even if there is a<br />
recoverable failure, caused, for example, by a node crash.<br />
The DECdtm transaction manager will decide the outcome of the transaction, then inform the resource manager of the decision with a commit or abort event report delivered to the RM participant (assuming that it is associated with an RMI that requested these event reports) or, in the event of a failure, using the resource manager's recovery mechanism.<br />
|-<br />
| SS$_VETO <br />
| No <br />
| RM participant requires that the transaction be aborted. The reason argument gives the reason why the RM participant is aborting the transaction.<br />
The RM participant guarantees that the effects of its transaction operations will never be detected by any transaction that commits.<br />
'''Side effects:'''<br />
The DECdtm transaction manager will deliver an abort event report for the transaction to the RM participant.<br />
|}<br />
<br />
===Replies to a Default Transaction Started Event Report (DDTM$K_STARTED_DEFAULT)===<br />
{| class="wikitable"<br />
! colspan="col" | report_reply <br />
! colspan="col" | Description<br />
|-<br />
| SS$_NORMAL <br />
| Adds a new RM participant running in the calling process to the transaction to which a new branch is being added. The new RM participant is associated with the RMI to which the default transaction started event was reported. The part_<br />
name and rm_context arguments specify the name of the new RM participant and its context.<br />
'''Side effects:'''<br />
The postconditions on successful completion of the call to $ACK_EVENT are the same as those for $JOIN_RM. <br />
DECdtm also allows the call to $START_TRANS or $START_BRANCH that is adding the new branch to complete (necessary but not sufficient condition). That call cannot complete successfully until all default transaction-started event reports delivered to RMIs in that process have been acknowledged.<br />
|-<br />
| SS$_FORGET <br />
| Acknowledgment of the event report.<br />
'''Side effects:'''<br />
DECdtm allows the call to $START_TRANS or $START_BRANCH that is adding the new branch to complete (necessary but not sufficient condition).<br />
That call cannot complete successfully until all default transaction-started event reports delivered to RMIs in that process have been acknowledged.<br />
|}<br />
<br />
===Replies to a Nondefault Transaction Started Event Report (DDTM$K_STARTED_NONDEFAULT)===<br />
{| class="wikitable"<br />
! colspan="col" | report_reply <br />
! colspan="col" | Description<br />
|-<br />
| SS$_NORMAL <br />
| Adds a new RM participant running in the calling process to the transaction to which a new branch is being added.<br />
The new RM participant is associated with the RMI to which the nondefault transaction started event was reported. The part_name and rm_context arguments specify the name of the new RM participant and its context.<br />
Side effects:<br />
The postconditions on successful completion of the call to $ACK_EVENT are the same as those for $JOIN_RM. DECdtm also allows the call to $START_TRANS or $START_BRANCH that is adding the new branch to complete (necessary but not sufficient condition). That call cannot complete successfully until all default transaction-started event reports delivered to RMIs in that process have been<br />
acknowledged.<br />
|-<br />
| SS$_FORGET <br />
| Acknowledgment of the event report.<br />
'''Side effects:'''<br />
DECdtm allows the call to $START_TRANS or $START_BRANCH that is adding the new branch to complete (necessary but not sufficient condition).<br />
That call cannot complete successfully until all default transaction-started event reports delivered to RMIs in that process have been acknowledged.<br />
|}<br />
<br />
==reason==<br />
{{SyservArgument|cond_value|longword (unsigned)|read only|by value}}<br />
<br />
A code that gives the reason why the RM participant is aborting the ransaction.<br />
This argument is ignored unless the value in the report_reply argument is SS$_VETO and the event being acknowledged is a prepare or one-phase commit<br />
event.<br />
The $DDTMMSGDEF macro defines symbolic names for abort reason codes described in Table SYS1–10. The default value for this argument is DDTM$_VETOED.<br />
<br />
===Abort Reason Codes===<br />
{| class="wikitable"<br />
! colspan="col" | Symbolic Name <br />
! colspan="col" | Description<br />
|-<br />
| DDTM$_ABORTED <br />
| Application aborted the transaction without giving a reason.<br />
|-<br />
| DDTM$_COMM_FAIL <br />
| Transaction aborted because a communications link failed.<br />
|-<br />
| DDTM$_INTEGRITY <br />
| Transaction aborted because a resource manager integrity constraint check failed.<br />
|-<br />
| DDTM$_LOG_FAIL <br />
| Transaction aborted because an attempt to write to the transaction log failed.<br />
|-<br />
| DDTM$_ORPHAN_BRANCH <br />
| Transaction aborted because it had an unauthorized branch.<br />
|-<br />
| DDTM$_PART_SERIAL <br />
| Transaction aborted because a resource manager serialization check failed.<br />
|-<br />
| DDTM$_PART_TIMEOUT <br />
| Transaction aborted because a resource manager timeout expired.<br />
|-<br />
| DDTM$_SEG_FAIL <br />
| Transaction aborted because a process or image terminated.<br />
|-<br />
| DDTM$_SERIALIZATION <br />
| Transaction aborted because a serialization check failed.<br />
|-<br />
| DDTM$_SYNC_FAIL <br />
| Transaction aborted because a branch had been authorized for it but had not been added to it.<br />
|-<br />
| DDTM$_TIMEOUT <br />
| Transaction aborted because its timeout expired.<br />
|-<br />
| DDTM$_UNKNOWN <br />
| Transaction aborted; reason unknown.<br />
|-<br />
| DDTM$_VETOED <br />
| Transaction aborted because a resource manager was unable to commit it.<br />
|}<br />
<br />
==beftime==<br />
{{SyservArgument|utc_date_time|octaword (unsigned)|read only|by reference}}<br />
<br />
Reserved to VSI.<br />
<br />
==afttime==<br />
{{SyservArgument|utc_date_time|octaword (unsigned)|read only|by reference}}<br />
<br />
Reserved to VSI.<br />
<br />
==part_name==<br />
{{SyservArgument|char_string|character-coded text string|read only|by descriptor-fixed-length string descriptor}}<br />
<br />
The name of the new RM participant that is added to the transaction by this call to $ACK_EVENT. This argument is ignored unless the event being acknowledged is of type Transaction Started and the value of the report_reply argument is SS$_NORMAL.<br />
<br />
If this argument is omitted (the default) or its value is zero, the name of the new RM participant is the same of that of the RMI with which it is associated.<br />
<br />
The string passed in this argument must be no longer than 32 characters.<br />
<br />
To ensure smooth operation in a mixed-network environment, refer to the chapter<br />
entitled Managing DECdtm Services in the {{Template:SysmanI}}, for information on defining node names.<br />
<br />
==rm_context==<br />
{{SyservArgument|userarg|longword (unsigned)|read only|by value}}<br />
<br />
The context associated with the new RM participant. This argument is ignored unless the value of the report_reply argument is SS$_NORMAL, and the event <br />
being acknowledged is of type Transaction Started.<br />
<br />
The context of the new RM participant is passed in the event reports<br />
subsequently delivered to that RM participant.<br />
<br />
The context is used to pass information specific to the new RM participant from<br />
the main line code into the event handler specified in the call to $DECLARE_RM<br />
that created the RMI with which the new RM participant is associated.<br />
<br />
If this argument is omitted (the default) or is zero, the context associated with the new RM participant is the same of that of the RMI with which it is associated.<br />
<br />
==timout==<br />
{{SyservArgument|date_time|quadword (unsigned)|read only|by reference}}<br />
<br />
Reserved to VSI.<br />
<br />
=Required Privileges=<br />
None<br />
<br />
=Required Quotas=<br />
None<br />
<br />
=Condition Values Returned=<br />
{| class="wikitable"<br />
! colspan="col" | Value<br />
! colspan="col" | Description<br />
|-<br />
| SS$_NORMAL<br />
| The request was successful.<br />
|-<br />
| SS$_ACCVIO<br />
| An argument was not accessible to the caller.<br />
|-<br />
| SS$_BADPARAM<br />
| Either the options flags were invalid, or the reply passed in the report_reply argument was invalid for the type of event being acknowledged.<br />
|-<br />
| SS$_BADREASON<br />
| The abort reason code passed in the reason argument was invalid.<br />
|-<br />
| SS$_EXASTL<br />
| The process AST limit (ASTLM) was exceeded.<br />
|-<br />
| SS$_ILLEFC<br />
| The event flag number was invalid.<br />
|-<br />
| SS$_INSFARGS<br />
| A required argument was missing.<br />
|-<br />
| SS$_INSFMEM<br />
| There was insufficient system dynamic memory for the operation.<br />
|-<br />
| SS$_INVBUFLEN<br />
| The string passed in the part_name argument was too long.<br />
|-<br />
| SS$_NOSUCHREPORT<br />
| Either an event report with the specified report identifier had not been delivered to any RM participant or RMI in the calling process, or that event report had already been acknowledged.<br />
|-<br />
| SS$_WRONGACMODE<br />
| The caller was in a less privileged access mode than that of the RMI whose event handler was used to deliver the event report that is being acknowledged by this call to $ACK_EVENT.<br />
|}<br />
<br />
=See also=<br />
* [[$ABORT_TRANS]]<br />
* [[$ABORT_TRANSW]]<br />
* [[$ADD_BRANCH]]<br />
* [[$ADD_BRANCHW]]<br />
* [[$CREATE_UID]]<br />
* [[$DECLARE_RM]]<br />
* [[$DECLARE_RMW]]<br />
* [[$END_BRANCH]]<br />
* [[$END_BRANCHW]]<br />
* [[$END_TRANS]]<br />
* [[$END_TRANSW]]<br />
* [[$FORGET_RM]]<br />
* [[$FORGET_RMW]]<br />
* [[$GETDTI]]<br />
* [[$GETDTIW]]<br />
* [[$GET_DEFAULT_TRANS]]<br />
* [[$JOIN_RM]]<br />
* [[$JOIN_RMW]]<br />
* [[$SETDTI]]<br />
* [[$SETDTIW]]<br />
* [[$SET_DEFAULT_TRANS]]<br />
* [[$SET_DEFAULT_TRANSW]]<br />
* [[$START_BRANCH]]<br />
* [[$START_BRANCHW]]<br />
* [[$START_TRANS]]<br />
* [[$START_TRANSW]]<br />
* [[$TRANS_EVENT]]<br />
* [[$TRANS_EVENT]]</div>Darya.zelenina