On Thu, 23 Apr 2009 07:42:44 -0700, Tim Meagher <[email protected]> wrote:

Hi Mary,

Thanks for the explanation - I'll give this a shot. I'm assuming I can just
make the change in the same pipeline...

I also appreciate the info about the links, however I don't think I can do the link because the linked document would be in another database. I keep the secondary doc in different databases because they use different schemas
and it avoids problems with setting different fragment roots and range
indexes on similarly named elements.

So when I create or update the document, the pipeline calls a program that runs an xquery to transform the incoming doc into a new format and inserts
or updates the results into the secondary database via an xdmp:invoke
function call - nasty but necessary... Likewise when I delete the document
it has to delete the document in the secondary database as well via an
xdmp:invoke function call.

If there's a better way to approach this I'm all ears...

Tim

I would just warn you that using xdmp:invoke that performs updates
in the context of CPF actions is definitely travelling off-reservation.
Since CPF state management depends on having the property updates
happen in the same transaction as the action, having some of that
work done separately can potentially leave you with an inconsistent
view if, say, lightning strikes the data center after the invoked call
commits but before the main one does.  That said, in the case of
delete, I think you can get away with it, or you can take an educated
gamble about the risk of lightning at the sensitive moment.

Cheers

//Mary

[email protected]
Principal Engineer
Mark Logic Corporation

_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to