Re: [Neo4j] TransactionDataImpl.deletedNodes not an ordered set

2011-12-14 Thread Mattias Persson
It's not only an issue with TransactionDataImpl. All the internal state in
a transaction is kept without ordering information because neo4j doesn't do
ordering guarantees in general. It would require a bigger change and could
introduce memory and performance overhead to do so. Why is the order there
important to you?

2011/12/8 tcolar 

> Hi,
>
> We use the Neo4JCommitListener to synchronize some neo4j data back to a
> database.
>
> I have an issue when trying to deal with the delete events.
>
> I delete nodes in a particular order in neo4j (it's a nested set, so
> down-up
> ), but when getting the events in the commitListener the order is not
> respected (random), this is because deletedNodes is not an ordered set.
>
> private final Collection deletedNodes = new HashSet();
>
> I think it would make sense to have that ordered, like:
>
> private final Collection deletedNodes = new LinkedHashSet();
>
> Otherwise I don't see a reliable way to resolve this kind of issues.
>
> Note that the same issue probably applies to the other collections in there
> as well.
>
> Thanks
>
>
> --
> View this message in context:
> http://neo4j-community-discussions.438527.n3.nabble.com/TransactionDataImpl-deletedNodes-not-an-ordered-set-tp3571499p3571499.html
> Sent from the Neo4j Community Discussions mailing list archive at
> Nabble.com.
> ___
> NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please
> register and consider posting at
> https://groups.google.com/forum/#!forum/neo4j
>
> Neo4j mailing list
> User@lists.neo4j.org
> https://lists.neo4j.org/mailman/listinfo/user
>



-- 
Mattias Persson, [matt...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user


[Neo4j] TransactionDataImpl.deletedNodes not an ordered set

2011-12-08 Thread tcolar
Hi,

We use the Neo4JCommitListener to synchronize some neo4j data back to a
database.

I have an issue when trying to deal with the delete events.

I delete nodes in a particular order in neo4j (it's a nested set, so down-up
), but when getting the events in the commitListener the order is not
respected (random), this is because deletedNodes is not an ordered set.

private final Collection deletedNodes = new HashSet();

I think it would make sense to have that ordered, like:

private final Collection deletedNodes = new LinkedHashSet();

Otherwise I don't see a reliable way to resolve this kind of issues.

Note that the same issue probably applies to the other collections in there
as well.

Thanks


--
View this message in context: 
http://neo4j-community-discussions.438527.n3.nabble.com/TransactionDataImpl-deletedNodes-not-an-ordered-set-tp3571499p3571499.html
Sent from the Neo4j Community Discussions mailing list archive at Nabble.com.
___
NOTICE: THIS MAILING LIST IS BEING SWITCHED TO GOOGLE GROUPS, please register 
and consider posting at https://groups.google.com/forum/#!forum/neo4j

Neo4j mailing list
User@lists.neo4j.org
https://lists.neo4j.org/mailman/listinfo/user