I don't like the idea of the garbage colector, you can write code to do it easily enough and in a lot of instances I have unattached nodes that are awaiting connection to the graph. I.e. if I'm loading data I load the nodes first so I think a garbage collector would be quite dangerous.
Why not just schedule a job to do this in your quiet time? D On 7 Nov 2009, at 11:49, Craig Taverner <[email protected]> wrote: > I'd vote for a garbage collector too. I often have code that deletes > large > trees of nodes, and it takes time, but I'd rather disconnect the > tree, load > my new data and then delete the old data later (during idle time). > Obviously > this can be done at application level, but it would be a nice > convenience to > have a sweeper that does this for us. Even one called manually, but > preferably a garbage collector. > > I guess one issue with this is that, for performance reasons, you > have two > competing requirements: > * Wanting data loaded and deleted in larger chunks (reduce disk > fragmentation) > * Have garbage collection run inconspiciously so it does not affect > app > performance > (I think these two conflict) > > On Fri, Nov 6, 2009 at 3:21 PM, Atle Prange <[email protected]> > wrote: > >> Thanks for the quick reply >> >> On Fri, 2009-11-06 at 14:57 +0100, Peter Neubauer wrote: >>> Hi Atle, >>> there is no automatic garbage collection in Neo4j. If you >>> disconnect a >>> node or subgraph form the root, it will still exist in the DB, but >>> of >>> course it is harder to reach via traversals, you will have to look >>> up >>> the graph by IDs. >>> >> Ah, that was what i expected, but not what i hoped for (or even >> dreamed >> about?) >> >> Then i guess i have to write a garbage-collector-traverser that >> cleans >> nodes that are no longer reachable from well known/root nodes, and >> run >> the traversal in given intervals. >> >> -atle >> >> >>> However, on a storage level, node IDs are reused when they are freed >>> by deleting a node, so, you can end up with new nodes having smaller >>> IDs than older nodes if you deleted a node with a very low ID >>> before. >>> Is that what you meant by garbage collection? >>> >>> Cheers, >>> >>> /peter neubauer >>> >>> Neo Technology >>> >>> GTalk: neubauer.peter >>> Skype peter.neubauer >>> Phone +46 704 106975 >>> LinkedIn http://www.linkedin.com/in/neubauer >>> Twitter http://twitter.com/peterneubauer >>> >>> http://www.neo4j.org - Relationships count. >>> http://www.oredev.se - The best thing since the wall >>> came >> down. >>> http://www.linkedprocess.org - Distributed computing on LinkedData >> scale >>> >>> >>> >>> On Fri, Nov 6, 2009 at 2:29 PM, Atle Prange <[email protected]> >> wrote: >>>> Hi, >>>> >>>> is there some sort of garbage collection in Neo4j? I have a vague >> memory >>>> of reading something about that all nodes must be reached from >>>> the root >>>> node, if they are not they are removed. Is this correct? >>>> >>>> -atle >>>> >>>> _______________________________________________ >>>> Neo mailing list >>>> [email protected] >>>> https://lists.neo4j.org/mailman/listinfo/user >>>> >>> _______________________________________________ >>> Neo mailing list >>> [email protected] >>> https://lists.neo4j.org/mailman/listinfo/user >> >> _______________________________________________ >> Neo mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user >> > _______________________________________________ > Neo mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

