xdmp:request-status( $host-id as xs:unsignedLong, $server-id as xs:unsignedLong, $request-id as xs:unsignedLong* ) as element(request-status)*
Returns the status of a running request . If the request ID is that of
the calling request, then no special permission is required. If the
ID is for another request, then the calling request needs
http://marklogic.com/xdmp/privileges/status
permission.
The result of this builtin is exactly equivalent to
xdmp:server-status(xdmp:host(), xdmp:server())//*:request-status[*:request-id = $req]
,
where $req
is the ID of the request
you are interested in.
In the 3.2 release this builtin is not cluster-aware, the
first argument (host ID) must be the same as the value returned
by xdmp:host
.
If you wish to obtain the status of a request
running on a remote host, use the code snippet above to obtain
the request status using
xdmp:server-status
.
Parameters | |
---|---|
host-id | A host ID. Must be the ID of the local host. |
server-id | A server ID (HTTP, XDBC, ODBC, webDAV, or Task). |
request-id | One or more request IDs. |
The structure of the data returned is as follows:
request-id
server-id
host-id
transaction-id
canceled
modules
database
root
request-kind
request-text
request-rewritten-text
update
start-time
time-limit
max-time-limit
lock-count
read-size
user
client-address
trigger-depth
expanded-tree-cache-hits
expanded-tree-cache-misses
request-state
profiling-allowed
profiling-enabled
debugging-allowed
debugging-status
retry-count
expr-id
where-stopped
xdmp:request-status(xdmp:host(), xdmp:server(), xdmp:request()) => <request-status xmlns="http://marklogic.com/xdmp/status/server"> <request-id>17571547553153953696</request-id> <server-id>6979985792045178484</server-id> <host-id>2612493919508853477</host-id> <transaction-id>2978550460365092692</transaction-id> <canceled>false</canceled> <modules>0</modules> <database>13419866041652476886</database> <root>Apps/</root> <request-kind>invoke</request-kind> <request-text>/qconsole/endpoints/eval.xqy</request-text> <request-rewritten-text>/qconsole/endpoints/eval.xqy?sid= 6693979901326946703&resulttype=text&qid= 2507225313416696807&cache=1363814207307</request-rewritten-text> <update>false</update> <start-time>2013-03-20T14:16:47.326-07:00</start-time> <time-limit>600</time-limit> <max-time-limit>1440</max-time-limit> <lock-count>100</lock-count> <read-size>100000<read-size> <user>893641342095093063</user> <client-address>127.0.0.1</client-address> <trigger-depth>0</trigger-depth> <expanded-tree-cache-hits>2</expanded-tree-cache-hits> <expanded-tree-cache-misses>0</expanded-tree-cache-misses> <request-state>running</request-state> <profiling-allowed>true</profiling-allowed> <profiling-enabled>false</profiling-enabled> <debugging-allowed>true</debugging-allowed> <debugging-status>detached</debugging-status> <retry-count>0</retry-count> </request-status>