Hi John, About 2) Not sure, but I am assuming each doc is inserted separately (or perhaps in batches), so a roll-back would occur on single failing docs, right? Don't think that was the problem. It was just that CORB bails out entirely once an exception occurs..
About 1) I'm a bit confused. The example in the docs tell that you can fetch a doc directly after a xdmp:commit from an insert just before the commit. Something that is not possible without the commit. How is that possible when the commit is postponed till the end of the execution? Kind of temp working space only visible to that statement? And is it then true that after the commit, the doc is not searchable yet? As the indexing exceptions haven't occurred yet, so I assume it is not indexed either? I'd love to try myself, but had to roll back to ML 4 due to a very specific bug triggered by some more obscure code I was playing around with.. Kind regards, Geert -----Oorspronkelijk bericht----- Van: [email protected] [mailto:[email protected]] Namens John Snelson Verzonden: donderdag 15 december 2011 10:51 Aan: [email protected] Onderwerp: Re: [MarkLogic Dev General] CORB processing continuation query. Hi Geert, On 15/12/11 06:45, Geert Josten wrote: > Just wondering. MarkLogic 5 has transaction management functions. Would > things be different if one would use those? E.g. set the mode to update > and do a commit after the insert? Would that make such exceptions > catchable from within the xquery code? Using explicit transaction commit wouldn't change the fact that the exception is uncatchable. There are a couple of reasons for this: 1) The commit still happens after execution of the statement - calling xdmp:commit() just queues the commit to happen. 2) The database is in an inconsistent state until the transaction workload has finished executing. MarkLogic only has one way to rectify the inconsistent state, which is to roll back the transaction - so you can't effectively recover from that kind of exception. John -- John Snelson, Senior Engineer http://twitter.com/jpcs MarkLogic Corporation http://www.marklogic.com _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
