Hi Nitish, Query (1) should be: delete edge isFriendOf FROM '#15:0' TO '#15:1'
You can try to execute this in transactions with SQL batch: begin; delete edge isFriendOf FROM '#15:0' TO '#15:1' commit retry 100; Lvc@ ᐧ On 25 August 2014 17:56, Nitish Gangal <[email protected]> wrote: > Hi Luca, > > We are using following two approaches to delete an edge: > 1. delete edge isFriendOf where in ='#15:0' and '#15:1' > 2. delete edge #14:0 > > From the above which is the more robust one. > Also the data corruption issue that we are facing is mostly in the area > where the query 1 is used. When we are executing query 2, we are not > getting any issues. Also when there are a lot of queries executing in > parallel query 1 executed gives the un-deleted references (But we are not > able to trace the exact situation). > > Please can you help us in the above situation. Also can you provide your > views on using above queries. > > Thanks, > Nitish Gangal > > > On Mon, Aug 18, 2014 at 8:32 PM, Nitish Gangal <[email protected]> > wrote: > >> Hi Luca, >> >> Any pointers on cleaning up such inconsistency in the database forcefully? >> Still facing same issue. >> >> Thanks, >> Nitish Gangal >> >> >> On Tuesday, August 12, 2014 8:59:01 PM UTC+5:30, Nitish Gangal wrote: >>> >>> Hello Luca, >>> >>> We will surely upgrade to version 1.7.7 but for now we are extensively >>> using version 1.6. >>> Please could you provide us some pointers so that we can clean up the >>> inconsistency created. >>> Your help in this will be very much helpful to us. >>> >>> Thanks, >>> Nitish >>> >>> On Tuesday, August 12, 2014 6:50:08 PM UTC+5:30, Lvc@ wrote: >>>> >>>> Hi Nitish, >>>> I can't reproduce your problem, everything works perfectly even if I >>>> brutally remove the edge with the DELETE command (not DELETE EDGE). Below >>>> the steps: >>>> >>>> create class User extends V >>>> create vertex User set name = 'a' >>>> create vertex User set name = 'b' >>>> >>>> create class isFriendOf extends E >>>> create edge isFriendOf from (select from User where name = 'a') to >>>> (select from User where name = 'b') set a = 33 >>>> delete from #14:0 >>>> select expand(in_isFriendOf) from user where name="a" >>>> >>>> So my suggestions is to upgrade to 1.7.7 (or 1.7.8 available in a >>>> couple of hours). >>>> >>>> Lvc@ >>>> >>>> >>>> >>>> On 12 August 2014 13:47, Nitish Gangal <[email protected]> wrote: >>>> >>>>> Hi, >>>>> >>>>> Following are the steps to reproduce the issue I am facing: >>>>> >>>>> 1. Create a user vertex class and create two nodes (User 1 and User 2). >>>>> 2. Create isFriendOf edge class. >>>>> 3. Create a isFriendOf edge connecting user 1 and user 2. >>>>> 4. Now, edge is created with unique rid having its references in user >>>>> 1 and user 2 vertices. >>>>> 5. Now, Delete edge using its unique rid with following query: >>>>> delete from @rid; >>>>> 6. Now, this edge is deleted but the references are still there in >>>>> user 1 vertex and user 2 vertex. >>>>> 7. Now, hit the query: select expand(in_isFriendOf) from user where >>>>> name="user 1"; >>>>> This query returns "java.lang.NullPointerException" >>>>> >>>>> These are the steps to reproduce the issue I am facing. >>>>> Please note that, in my case, in step no 5, we are using "delete edge >>>>> @rid" but since, we are not able to reproduce, we have found above steps >>>>> that replicates exact sceanrio and issue. >>>>> >>>>> Request you to provide your inputs for deleting the references from >>>>> user 1 vertex and user 2 vertex in order to clean up such null references. >>>>> >>>>> Thanks, >>>>> Nitish Gangal >>>>> >>>>> On Tuesday, August 12, 2014 3:16:19 PM UTC+5:30, Lvc@ wrote: >>>>> >>>>>> Hi Nitish, >>>>>> that is correct, so you shouldn't have such problem. Both DELETE >>>>>> VERTEX and DELETE EDGE are transactional, so in case of problem the tx is >>>>>> rolled back. >>>>>> >>>>>> Can you post the query that gives you the Exception and what >>>>>> exception? >>>>>> >>>>>> Lvc@ >>>>>> >>>>>> >>>>>> >>>>>> On 12 August 2014 11:00, Nitish Gangal <[email protected]> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> Thanks for your reply. >>>>>>> >>>>>>> Ideally, we use, >>>>>>> >>>>>>> delete vertex @rid - for deleting vertices and >>>>>>> delete edge @rid - for deleting edges >>>>>>> >>>>>>> I think, we read somewhere that by doing "delete from @rid" >>>>>>> directly, it does not delete edge references from vertices. >>>>>>> hence, we are using queries as mentioned above. >>>>>>> >>>>>>> Please correct if we are missing something. >>>>>>> >>>>>>> Thanks, >>>>>>> Nitish Gangal >>>>>>> >>>>>>> >>>>>>> >>>>>>> On Tuesday, August 12, 2014 12:57:07 PM UTC+5:30, Lvc@ wrote: >>>>>>> >>>>>>>> Hi, >>>>>>>> How do you delete vertex/edge? >>>>>>>> >>>>>>>> Lvc@ >>>>>>>> >>>>>>>> Sent from Mobile device >>>>>>>> Il 12/ago/2014 09:16 "Nitish Gangal" <[email protected]> ha >>>>>>>> scritto: >>>>>>>> >>>>>>>>> Hello, >>>>>>>>> >>>>>>>>> I am using orientdb v1.6. >>>>>>>>> I have a structure like: >>>>>>>>> >>>>>>>>> User vertex( user 1) -> connected with edge "isFriendOf" edge >>>>>>>>> class -> with other user vertex(user 2). >>>>>>>>> >>>>>>>>> All the positive scenarios work just fine. >>>>>>>>> But in in certain scenarios when, we delete edge of "isFriendOf" >>>>>>>>> class, its @rid references does not get cleaned up from user 1 and >>>>>>>>> user 2 >>>>>>>>> vertices. >>>>>>>>> This causes complete inconsistency in graph database and any query >>>>>>>>> over these vertices and "isFriendOf" edge classes just returns an >>>>>>>>> exception. >>>>>>>>> We tried to identify and clean up such references through web >>>>>>>>> admin interface and through orientdb console, still I get the >>>>>>>>> exceptions. >>>>>>>>> >>>>>>>>> Completely stuck with it for now. Also, this looks kind of a >>>>>>>>> severe thing for me. >>>>>>>>> Any pointers regarding this will be extremely helpful. >>>>>>>>> >>>>>>>>> Please help me with following two things asap: >>>>>>>>> 1. When such inconsistency can arise in orientdb? >>>>>>>>> 2. How to clean up such things? >>>>>>>>> >>>>>>>>> Please help me at the earliest. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Nitish Gangal >>>>>>>>> >>>>>>>>> >>>>>>>>> -- >>>>>>>>> >>>>>>>>> --- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups "OrientDB" group. >>>>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>>>> send an email to [email protected]. >>>>>>>>> >>>>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>>>> >>>>>>>> -- >>>>>>> >>>>>>> --- >>>>>>> You received this message because you are subscribed to the Google >>>>>>> Groups "OrientDB" group. >>>>>>> To unsubscribe from this group and stop receiving emails from it, >>>>>>> send an email to [email protected]. >>>>>>> For more options, visit https://groups.google.com/d/optout. >>>>>>> >>>>>> >>>>>> -- >>>>> >>>>> --- >>>>> You received this message because you are subscribed to the Google >>>>> Groups "OrientDB" group. >>>>> To unsubscribe from this group and stop receiving emails from it, send >>>>> an email to [email protected]. >>>>> For more options, visit https://groups.google.com/d/optout. >>>>> >>>> >>>> -- >> >> --- >> You received this message because you are subscribed to a topic in the >> Google Groups "OrientDB" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/orient-database/FEE6paL7hOw/unsubscribe >> . >> To unsubscribe from this group and all its topics, send an email to >> [email protected]. >> >> For more options, visit https://groups.google.com/d/optout. >> > > -- > > --- > You received this message because you are subscribed to the Google Groups > "OrientDB" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- --- You received this message because you are subscribed to the Google Groups "OrientDB" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
