You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by Marvin Froeder <ve...@gmail.com> on 2015/12/01 00:21:45 UTC

Re: Infinite loop on removeVertices() test...

Right now I would not be easy...

@mpollmeier you probably would be best to answer that one.

On Tue, Dec 1, 2015 at 11:03 AM, Marko Rodriguez <ok...@gmail.com>
wrote:

> Marvin, how hard (inefficient) would it be to make it so the iterator of
> OrientDB's TinkerPop implementation is "static." I would prefer to have
> consistent behavior on this front for all providers as opposed to adding
> yet another Feature distinction.
>
> Thoughts?,
> Marko.
>
> http://markorodriguez.com
>
> On Nov 30, 2015, at 12:22 PM, Marvin Froeder <ve...@gmail.com> wrote:
>
> For now, my graph provider throws an AssumptionViolatedException for this
> test...
>
> So I can skip it.
>
> On Tue, 1 Dec 2015 08:16 Marko Rodriguez <ok...@gmail.com> wrote:
>
>> Hi,
>>
>> I was assuming that the original iterator is "static" with its values and
>> thus, if you add values while you iterate, you will only be iterating over
>> those edges you had prior to the iteration.
>>
>> Unfortunately, it seems the OrientDB has a "dynamic" iterator that can
>> grow during iteration…
>>
>> Either OrientDB forces a "static" iteration or perhaps we add a new
>> Feature:
>> Graph.Features.supportsStaticVertexIteration
>> Graph.Features.supportsStaticEdgeIteration
>> Vertex.Features.supportsStaticVertexIteration
>> Vertex.Features.supportsStaticEdgeIteration
>>
>> …I'm sorta scared of "yet more Features."
>>
>> Thoughts?,
>> Marko.
>>
>> http://markorodriguez.com
>>
>> On Nov 27, 2015, at 5:23 AM, Stephen Mallette <sp...@gmail.com>
>> wrote:
>>
>> I don't remember exactly what we wanted to enforce there - Marko looks
>> like
>> you added that one around TinkeGraph, can you comment?
>>
>> On Thu, Nov 26, 2015 at 2:10 PM, Marvin Froeder <ve...@gmail.com>
>> wrote:
>>
>> Hey,
>>
>> I was looking the EdgeTest, and it can cause infinite loops...
>>
>>
>>
>> https://github.com/apache/incubator-tinkerpop/commit/4b5d67aed4c69a0383d0e887501a8bba68a0e973#commitcomment-14537644
>>
>> For each edge the test removes, 2 more are added.
>>
>> For OrientDB drive we stream the edges live, from the DB, so this test
>> enter in an infinite loop.
>>
>>
>> Any suggestions how can I circumvent it?
>>
>>
>>
>

Re: Infinite loop on removeVertices() test...

Posted by Michael Pollmeier <mi...@michaelpollmeier.com>.
If I understand correctly, Marko wants the iterator to return the same 
vertices, no matter what happens with the graph in the meantime. I agree 
with that behaviour and was actually surprised to hear that it doesn't 
do that. To tell us the truth I just added a test, and that proves the 
static behaviour. Am I missing something?

https://github.com/mpollmeier/orientdb-gremlin/blob/master/driver/src/test/java/org/apache/tinkerpop/gremlin/orientdb/OrientGraphTest.java#L163

FYI: all the driver does is to wrap the iterator from Orient.

https://github.com/mpollmeier/orientdb-gremlin/blob/master/driver/src/main/java/org/apache/tinkerpop/gremlin/orientdb/OrientGraph.java#L266

I've adding Luca to the list.

On 12/01/2015 12:21 PM, Marvin Froeder wrote:
> Right now I would not be easy...
>
> @mpollmeier you probably would be best to answer that one.
>
> On Tue, Dec 1, 2015 at 11:03 AM, Marko Rodriguez <ok...@gmail.com>
> wrote:
>
>> Marvin, how hard (inefficient) would it be to make it so the iterator of
>> OrientDB's TinkerPop implementation is "static." I would prefer to have
>> consistent behavior on this front for all providers as opposed to adding
>> yet another Feature distinction.
>>
>> Thoughts?,
>> Marko.
>>
>> http://markorodriguez.com
>>
>> On Nov 30, 2015, at 12:22 PM, Marvin Froeder <ve...@gmail.com> wrote:
>>
>> For now, my graph provider throws an AssumptionViolatedException for this
>> test...
>>
>> So I can skip it.
>>
>> On Tue, 1 Dec 2015 08:16 Marko Rodriguez <ok...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I was assuming that the original iterator is "static" with its values and
>>> thus, if you add values while you iterate, you will only be iterating over
>>> those edges you had prior to the iteration.
>>>
>>> Unfortunately, it seems the OrientDB has a "dynamic" iterator that can
>>> grow during iteration…
>>>
>>> Either OrientDB forces a "static" iteration or perhaps we add a new
>>> Feature:
>>> Graph.Features.supportsStaticVertexIteration
>>> Graph.Features.supportsStaticEdgeIteration
>>> Vertex.Features.supportsStaticVertexIteration
>>> Vertex.Features.supportsStaticEdgeIteration
>>>
>>> …I'm sorta scared of "yet more Features."
>>>
>>> Thoughts?,
>>> Marko.
>>>
>>> http://markorodriguez.com
>>>
>>> On Nov 27, 2015, at 5:23 AM, Stephen Mallette <sp...@gmail.com>
>>> wrote:
>>>
>>> I don't remember exactly what we wanted to enforce there - Marko looks
>>> like
>>> you added that one around TinkeGraph, can you comment?
>>>
>>> On Thu, Nov 26, 2015 at 2:10 PM, Marvin Froeder <ve...@gmail.com>
>>> wrote:
>>>
>>> Hey,
>>>
>>> I was looking the EdgeTest, and it can cause infinite loops...
>>>
>>>
>>>
>>> https://github.com/apache/incubator-tinkerpop/commit/4b5d67aed4c69a0383d0e887501a8bba68a0e973#commitcomment-14537644
>>>
>>> For each edge the test removes, 2 more are added.
>>>
>>> For OrientDB drive we stream the edges live, from the DB, so this test
>>> enter in an infinite loop.
>>>
>>>
>>> Any suggestions how can I circumvent it?
>>>
>>>
>>>
>>
>