interesting.  i wonder why.....

sounds like a bug - please open a ticket for further discussion.

On Thu, Oct 22, 2015 at 7:57 AM, Dylan Millikin <[email protected]>
wrote:

> Yes, and if I send it from another client it also works as expected.
>
> On Thu, Oct 22, 2015 at 1:35 PM, Stephen Mallette <[email protected]>
> wrote:
>
> > what happens in your php tests if you remove the sessionless call?  does
> it
> > work as expected?
> >
> > On Thu, Oct 22, 2015 at 7:25 AM, Dylan Millikin <
> [email protected]>
> > wrote:
> >
> > > >Where do you set the transaction model to MANUAL? I don't see that in
> > > your requests
> > > for your php tests or in the java test case?
> > >
> > > I don't. I actually never have, it was a bit of a misunderstanding
> we've
> > > built up through the past few issues. I'm mostly responsible for it
> > because
> > > I assumed from reading the documentation (before checking the code)
> that
> > > since we had to manually handle transactions in a session request, it
> > > must've meant Transaction.onReadWrite() was set to MANUAL (clearly
> > wrong).
> > >
> > > > I don't think it should matter - one socket should be able to handle
> > > both sessionless
> > > and in-session requests.
> > >
> > > Is it perhaps that the graph instance is created on a socket open so
> > > somehow transaction handling is carried over between requests on that
> > same
> > > socket? (or something along those lines)
> > >
> > > Anyways, thanks for pointing out the WebSocketClient. I'll give that a
> go
> > > and see if I can make a failing test, then I'll try and figure out what
> > is
> > > causing this.
> > >
> > > On Thu, Oct 22, 2015 at 12:03 PM, Stephen Mallette <
> [email protected]
> > >
> > > wrote:
> > >
> > > > I don't think it should matter - one socket should be able to handle
> > both
> > > > sessionless and in-session requests.  If gremlin-driver hides too
> much
> > > > stuff, you can do some tests with a strip down client I have for
> basic
> > > > testing:
> > > >
> > > >
> > > >
> > >
> >
> https://github.com/PommeVerte/incubator-tinkerpop/blob/beea4dc40ae5dae8e2c7f3c6094dbcc551478cc6/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/simple/WebSocketClient.java
> > > >
> > > > On Thu, Oct 22, 2015 at 5:53 AM, Dylan Millikin <
> > > [email protected]>
> > > > wrote:
> > > >
> > > > > Wow just reading over my email again helped me figure this one out.
> > > > > Although the messages sent are the same, there's a distinct
> > difference
> > > > > between the two tests.
> > > > >
> > > > > The gremlin-driver test creates two clients that I'm guessing
> connect
> > > to
> > > > > gremlin-server via different sockets.
> > > > > The gremlin-php test sends both sessionless and in session messages
> > on
> > > > the
> > > > > same socket (same client). If I create two different clients the
> > tests
> > > > > pass.
> > > > >
> > > > > Is this something I can test with gremlin-driver? I'll go through
> the
> > > api
> > > > > to see if I can build a failing test.
> > > > >
> > > > > I don't know if this was by design but it's a bit of an issue as we
> > > > usually
> > > > > only create one client per thread and then mix sessionless and
> > > in-session
> > > > > requests with a single client. (The single client design is more or
> > > less
> > > > > standard in PHP).
> > > > >
> > > > > Anyways if it's by design and there's a good reason I guess I could
> > > > modify
> > > > > the driver to abstract multi client handling for both cases.
> > > > >
> > > > > On Thu, Oct 22, 2015 at 11:37 AM, Dylan Millikin <
> > > > [email protected]
> > > > > >
> > > > > wrote:
> > > > >
> > > > > > Hey guys,
> > > > > >
> > > > > > I've written the following test that passes:
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/PommeVerte/incubator-tinkerpop/blob/transaction-test/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinDriverIntegrateTest.java#L591-L615
> > > > > >
> > > > > > Unfortunately the exact same test from my gremlin-php driver
> fails.
> > > The
> > > > > > second isOpen() test returns true.
> > > > > >
> > > > > > The gremlin-php messages sent are the following :
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> application/json{"requestId":"77a459e3-32d9-4640-89cb-c2e28c67caf5","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().open()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> application/json{"requestId":"576aec62-442a-4a21-bcac-cbac36a388e9","processor":"session","op":"eval","args":{"gremlin":"t.addV(\"name\",\"stephen\").next()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> application/json{"requestId":"e1dfae26-f115-43c3-9b44-cf2879375037","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().commit()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> application/json{"requestId":"359e2f72-f6fd-4a91-a0bd-0dd8002465fb","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().isOpen()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
> > > > > > ----RETURNS FALSE----
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> application/json{"requestId":"bf1a7d47-5819-4171-87a0-3be5adfe70e7","processor":"","op":"eval","args":{"gremlin":"graphT.traversal().V()"}}
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> application/json{"requestId":"53f53620-4337-4ccf-8a85-6ab25d0f78e3","processor":"session","op":"eval","args":{"gremlin":"graphT.tx().isOpen()","session":"6e1c97b3-3f69-4b08-aa7c-c137a47cf04b"}}
> > > > > > ----RETURNS TRUE----
> > > > > >
> > > > > > And as far as I can tell these are the same as the ones sent from
> > > > > > gremlin-driver test but the results differ. The only thing that
> > > changes
> > > > > > might be the serializer which should have no effect?
> > > > > >
> > > > > > If anyone has any idea as to where there could be an issue, feel
> > free
> > > > to
> > > > > > shout out with ideas (as vague as they may be) I'm investigating
> > this
> > > > one
> > > > > > in the dark so I'd be more that grateful for a little help
> > focussing
> > > my
> > > > > > search.
> > > > > >
> > > > > > PS: results are the same with the ThreadLocal transaction
> consumers
> > > > > patch.
> > > > > > Although this shouldn't have an effect anyways I thought I would
> > > point
> > > > it
> > > > > > out.
> > > > > >
> > > > > > Cheers,
> > > > > > Dylan.
> > > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to