Hi Mike,

  I will check that. I am using eval to make sure  most of the exceptions are 
caught and handled properly, which is not given in the code.  

Thanks,
Prasanth

Sent from my HTC

----- Reply message -----
From: "Michael Blakeley" <[email protected]>
Date: Tue, Nov 29, 2011 3:29 am
Subject: [MarkLogic Dev General] Directory delete
To: "General MarkLogic Developer Discussion" <[email protected]>

I wonder if the flex-rep scheduled task is competing with the deletes? Try 
setting file-log-level to "Debug", and look in ErrorLog.txt for any 
XDMP-DEADLOCK warnings.

Why is this code using eval? Why not simply delete the document in the main 
query?

-- Mike

On 28 Nov 2011, at 08:50 , Prasanth V J wrote:

> Hi all,
> 
>    I have a directory named "/test/prasanth/" which contains only 5 documents 
> in it. When i try to delete this directory using the following query, i am 
> facing some huge performance issues.
> 
> let $uri :="/test/prasanth/"
> let $delete-statement := "
>                            declare variable $dir-uri  external;
>                           xdmp:directory-delete($dir-uri)                
>                             " 
> return  
>    try {
>    xdmp:eval($delete-statement,(xs:QName("dir-uri"),$uri),
>                                        <options xmlns="xdmp:eval">
>                                           
> <modules>{xdmp:modules-database()}</modules>
>                                             
> <prevent-deadlocks>true</prevent-deadlocks>
>                                            
> <user-id>{xdmp:user("some_user")}</user-id>
>                                        </options>
>                                      )
>    }
>    catch($ex) {
> $ex
> }
> 
> while i run this query in cq profiler sometimes the time taken is even more 
> than 5 mins to delete 5 documents. I am running this query in 4.2-6 ML server 
> and the flexible replication is on and will be running on every minute.
> 
> What may be the possible issue of performance here? Does it have anything to 
> do with locks? What are other possible solutions to achieve the same? 
> 
> Regards,
> Prasanth
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

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

Reply via email to