[XQZone General] Questions about errors/exceptions

atownsen at wiley.co.uk atownsen at wiley.co.uk
Thu Oct 27 07:03:48 PDT 2005




Hi Darin,

You said :
> My guess is that MarkLogic, for certain types of
> errors  ... such as time limit exceeded ... prohibits certain types of
> additional operations to be performed against the database (such as a
> document insert or node insert).

I'm not answering your final questions but assuming you are correct with
the above comment you might be able to work around some of your logging
limitations by using a different transaction, a different database or even
a different server.

You could try using xdmp:eval() or xdmp:eval-in() to form separate
transactions for the same database or for an alternative database.

You could also try using the RemoteCQ code I sent out yesterday to cause
the logging to be done to a different server altogether, or to the same
server but in a transaction separated by HTTP.  This would depend on what
the "prohibited" operations were after a given error.

I think you could also fairly easily proxy CQ with my RemoteCQ so that
users queries were HTTP'd rather than being directly xdmp:eval-in()'d by CQ
so that you could at the very least easily capture any errors reported
directly by CQ and log those from the proxy.  The performance for me is
indistinguishable from normal CQ.

Andy
|-----------------------------+-------------------------------------------|
|   "McBeath, Darin W         |                                           |
|   (ELS-AMS)"                |                                           |
|   <D.McBeath at elsevier.com>  |                                         To|
|   Sent by:                  |                                        "'g|
|   general-bounces at xqzone.mar|                                        ene|
|   klogic.com                |                                        ral|
|                             |                                        @xq|
|   27/10/2005 14:10          |                                        zon|
|                             |                                        e.m|
|         Please respond to   |                                        ark|
|          General XQZone     |                                        log|
|            Discussion       |                                        ic.|
|      <general at xqzone.marklog|                                        com|
|              ic.com>        |                                        '" |
|                             |                                        <ge|
|                             |                                        ner|
|                             |                                        al@|
|                             |                                        xqz|
|                             |                                        one|
|                             |                                        .ma|
|                             |                                        rkl|
|                             |                                        ogi|
|                             |                                        c.c|
|                             |                                        om>|
|                             |                                         cc|
|                             |                                           |
|                             |                                    Subject|
|                             |                                        [XQ|
|                             |                                        Zon|
|                             |                                        e  |
|                             |                                        Gen|
|                             |                                        era|
|                             |                                        l] |
|                             |                                        Que|
|                             |                                        sti|
|                             |                                        ons|
|                             |                                        abo|
|                             |                                        ut |
|                             |                                        err|
|                             |                                        ors|
|                             |                                        /ex|
|                             |                                        cep|
|                             |                                        tio|
|                             |                                        ns |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|                             |                                           |
|-----------------------------+-------------------------------------------|








I have a derivation of CQ where I have made some enhancements to do
logging,
etc.  The logging actually inserts records into a MarkLogic database.
Someday, I will actually clean up this code and put it on xqzone ... but
that is another matter.

But, as part of the error (exception) catching I am sometimes running into
difficulties ... mostly (I believe) because of the logging (and insertion)
of records into a MarkLogic database after certain errors have been caught.

For certain types of 'errors' ... such as XQuery syntax errors ... there is
no problem with the logging or insertion of a record into the MarkLogic
database.  However, for other types of errors (such as time limit exceeded)
I then get an 'unknown exception' error when trying to log the error (into
the MarkLogic database).  My guess is that MarkLogic, for certain types of
errors  ... such as time limit exceeded ... prohibits certain types of
additional operations to be performed against the database (such as a
document insert or node insert).  I'm certain there are other types of
errors that will cause a similar problem ... such as tree-cache full, etc.

So, my question is whether there is an easy way for me to identify those
errors generated by the MarkLogic server that are ok to go ahead and log
the
error message (insert a record into the MarkLogic database).   I could then
avoid the logging of the other more critical errors (at least within the
current transaction) and prevent this anomaly.

Thanks for any help ... btw, I'm using ML 3.0.3 but I will also be porting
this code to 2.2.7.

Darin.



_______________________________________________
General mailing list
General at xqzone.marklogic.com
http://xqzone.com/mailman/listinfo/general


######################################################################
The information contained in this e-mail and any subsequent 
correspondence is private and confidential and intended solely 
for the named recipient(s).  If you are not a named recipient, 
you must not copy, distribute, or disseminate the information, 
open any attachment, or take any action in reliance on it.  If you 
have received the e-mail in error, please notify the sender and delete
the e-mail.  

Any views or opinions expressed in this e-mail are those of the 
individual sender, unless otherwise stated.  Although this e-mail has 
been scanned for viruses you should rely on your own virus check, as 
the sender accepts no liability for any damage arising out of any bug 
or virus infection.
######################################################################



More information about the General mailing list