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 <atle.pra...@gmail.com> 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 <atle.pra...@gmail.com>
> 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
> > > User@lists.neo4j.org
> > > https://lists.neo4j.org/mailman/listinfo/user
> > >
> > _______________________________________________
> > Neo mailing list
> > User@lists.neo4j.org
> > https://lists.neo4j.org/mailman/listinfo/user
>
> _______________________________________________
> Neo mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>
_______________________________________________
Neo mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user

Reply via email to