Edge property drop error in 3.4.5

45 views
Skip to first unread message

Philip Graff

unread,
Feb 11, 2020, 7:49:06 PM2/11/20
to Gremlin-users
Hi all,

I've noticed a bug when dropping edge properties introduced with 3.4.5. I ran the following groovy script on both 3.4.4 and 3.4.5.

g = TinkerFactory.createModern().traversal()
g.V().property("myprop", true).iterate()
System.out.println(g.V().has("myprop").count().next())
g.V().properties("myprop").drop().iterate()
System.out.println(g.V().has("myprop").count().next())
g.E().property("myprop", true).iterate()
System.out.println(g.E().has("myprop").count().next())
g.E().properties("myprop").drop().iterate()
System.out.println(g.E().has("myprop").count().next())
:x

In 3.4.4, it prints:

6
0
6
0

In 3.4.5, it prints:

6
0
6
5

#!/bin/sh
for VERSION in "3.4.4" "3.4.5"
do
./apache-tinkerpop-gremlin-console-${VERSION}/bin/gremlin.sh -i testDrop.groovy
done

For the moment, I've gone back to 3.4.4.

Cheers,
Phil

Stephen Mallette

unread,
Feb 12, 2020, 6:46:45 AM2/12/20
to gremli...@googlegroups.com
It seems we have a bit of an unwelcome side-effect of:


LazyBarrierStrategy injects itself and starts bulking things. for 3.4.5 I guess the workaround is to remove that strategy if you are trying to explicitly drop() edge (or meta) properties:

gremlin> g.withoutStrategies(LazyBarrierStrategy).E().properties("myprop").drop()
gremlin> g.E().has("myprop").count().next()
==>0

I think the change at TINKERPOP-2318 was still good so I don't think the answer is to revert the change. 


 

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/36323fba-8858-47c6-a4db-0890efb50336%40googlegroups.com.

Stephen Mallette

unread,
Feb 13, 2020, 8:12:57 AM2/13/20
to gremli...@googlegroups.com
Note that there is currently discussion on the dev list regarding release of 3.4.6 to fix this issue:


We now have a fix that appears to be working and passing all tests at - it's about ready for review, i'm just reflecting on the change a bit to be sure there's nothing else to add::


I've pushed the 3.4.6-SNAPSHOT to the Apache repo in case anyone wants to try it out to see if it works in their environment.

Philip Graff, thanks for bringing this issue to our attention so quickly. 


Philip Graff

unread,
Feb 14, 2020, 7:55:10 AM2/14/20
to gremli...@googlegroups.com
Thank you for the quick response and solution. I found it because the bad drop caused one of my unit tests to fail. It took a little digging to figure out the reason. I can try 3.4.6-SNAPSHOT and report back if it works.

Phil 

You received this message because you are subscribed to a topic in the Google Groups "Gremlin-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gremlin-users/wB0a9uP98Zw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CAA-H43-_5dfvuLEZx_cRgJVcrL2NV7xBrbPf_T4NjqcxHTCx8Q%40mail.gmail.com.
--
Philip B. Graff

Philip Graff

unread,
Feb 14, 2020, 11:03:28 AM2/14/20
to Gremlin-users
3.4.6-SNAPSHOT passes my test that failed with 3.4.5.

Thanks,
Phil

Stephen Mallette

unread,
Feb 14, 2020, 11:40:37 AM2/14/20
to gremli...@googlegroups.com
nice - thank you for taking the time to confirm. 

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages