[MarkLogic Dev General] trigger not getting invoked in a clustered environment
Raghu
raghupathy.visweswaran at gmail.com
Sun Sep 18 11:04:17 PDT 2011
Hi Danny,
Thanks once again. I'm not using any content processing framework. Its
just an xquery. I don't have the luxury of adding nodes. Any ways it isn't
throwing up any errors in the logs that is what is keeping me guessing.I
will let you know if I find something interesting!
Thanks
Raghu
On Sun, Sep 18, 2011 at 3:54 AM, Danny Sokolsky <
Danny.Sokolsky at marklogic.com> wrote:
> Raghu,
>
> When you say it works in a single host, but not in a clustered environment,
> let's drill down into what has changed in your scenario. See if you can
> find the error you are getting when it is not invoking the module. That
> might provide a clue as to what is not working. Here is what I would try:
>
> 1) Set up a single node cluster and ensure it is working.
> 2) Add another node to that same cluster and see if it still works against
> the host that it originally worked on.
> 3) Then try the same test using the other host as the e-node (that is, by
> executing the triggering query against the other node).
>
> That will allow you to debug it. If your code is in the modules database,
> then it should be accessible from anywhere in the cluster. If, however, you
> have placed your code under the Modules directory, then you would need to
> duplicate that code in each node in the cluster.
>
> Beyond the code being accessible from each host, I can't think of a
> particular setting that would cause it not to work on one host. Something
> perhaps is different between your hosts that you have yet to discover.
>
> Once again, if you are using cpf, then there are a few more dubugging
> alternatives.
>
> -Danny
> ________________________________________
> From: general-bounces at developer.marklogic.com [
> general-bounces at developer.marklogic.com] On Behalf Of Raghu [
> raghupathy.visweswaran at gmail.com]
> Sent: Saturday, September 17, 2011 10:41 AM
> To: General MarkLogic Developer Discussion
> Subject: Re: [MarkLogic Dev General] trigger not getting invoked in a
> clustered environment
>
> HI Danny,
>
> Thanks. I've ensured that everything is in place. The same
> trigger works fine in a single host but in a clustered environment it
> isn't invoking the module. Is there any setting which might cause this kind
> of behavior?
>
> Thanks
> Raghu
>
> On Fri, Sep 16, 2011 at 9:48 PM, Danny Sokolsky <
> Danny.Sokolsky at marklogic.com<mailto:Danny.Sokolsky at marklogic.com>> wrote:
> Hi Raghu,
>
> Is your trigger module (/userdir/modules/xquery/migrate-helper.xqy based on
> the trigger create code you showed) loaded into the database names
> "Modules". To check that, run (in cq for example):
>
>
> fn:doc("/userdir/modules/xquery/migrate-helper.xqy ")
>
>
> against the Modules database. It should return the text of the module.
>
>
> Assuming you are using CPF, in the document that is not being triggered,
> take a look at the properties:
>
>
> xdmp:document-properties($uri)
>
>
> where $uri is the URI of the document that did not get updated.
>
> Those are some places to start.
>
> -Danny
>
> From: general-bounces at developer.marklogic.com<mailto:
> general-bounces at developer.marklogic.com> [mailto:
> general-bounces at developer.marklogic.com<mailto:
> general-bounces at developer.marklogic.com>] On Behalf Of Raghu
> Sent: Friday, September 16, 2011 5:58 AM
> To: General MarkLogic Developer Discussion
> Subject: [MarkLogic Dev General] trigger not getting invoked in a clustered
> environment
>
> Hi All,
>
> I'm having a migrator xquery which I need to invoke when a user does
> an operation and so I've used a trigger on the user's directory with
> infinity as depth. It is working fine in normal environment but it isn't
> invoking the migrator query in a clustered environment. Can somebody help me
> out?
>
> PFB the trigger
>
> import module namespace trgr="http://marklogic.com/xdmp/triggers"
> at "/MarkLogic/triggers.xqy";
> trgr:create-trigger("migrate folders", "migrate folders",
> trgr:trigger-data-event(
> trgr:directory-scope("/userdir/1234/", "infinity"),
> trgr:document-content("modify"),
> trgr:post-commit()),
> trgr:trigger-module(xdmp:database("Modules"), "/userdir/modules/xquery/",
> "migrate-helper.xqy"),
> fn:true(), xdmp:default-permissions())
>
>
>
> Thanks in advance
> Raghu
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com<mailto:General at developer.marklogic.com>
> http://developer.marklogic.com/mailman/listinfo/general
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://developer.marklogic.com/mailman/listinfo/general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20110918/0600f709/attachment.html
More information about the General
mailing list