orientechnologies / orientdb-gremlin

TinkerPop3 Graph Structure Implementation for OrientDB
Apache License 2.0
91 stars 32 forks source link

Record metadata not found exception #133

Closed maximskripnik closed 7 years ago

maximskripnik commented 7 years ago

Hello guys, thanks for this project, but it seems I can not do one of the simplest things:

package test

import org.apache.tinkerpop.gremlin.orientdb.OrientGraphFactory
import org.scalatest._
import gremlin.scala._

class SampleTest extends WordSpec with Matchers {

  val db = new OrientGraphFactory("remote:localhost:2424/foobarbaz", "admin", "admin")
  val g = db.getNoTx

  "graph" should {

    "return nothing" in {
      g.V("#7:42").headOption shouldBe empty
    }

  }

}

Why am I getting com.orientechnologies.orient.core.exception.ODatabaseException: Record metadata for RID: #7:42, Not found? Following the exception stack, I guessed that it's because of this call: at com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx.getRecordMetadata and it makes sense that it can not find metadata for the record that doesn't exist. But is this intended behaviour? I mean, there is a similar test here and it works for inmemory db.

OrientDB instance is brand-new and installed via orientdb official dockerfile. All I did is created 'foobarbaz' database and that is it. Did nothing else.

I'm sorry if this is too trivial to ask, but I can not find any information about this specific case neither here, no in Orient documentation.

Thank you!

wolf4ood commented 7 years ago

hi @maximskripnik

does the record #7:42 exists?

maximskripnik commented 7 years ago

Hello @maggiolo00

No, like I wrote, the record indeed does not exist. Database is completely empty for the the moment of test execution. I just find exception throwing a bit too loud way to notify about that.

And I think that this test agrees with me since it doesn't intercept exception. So my question is, how do I correctly check for vertix presence if everything above is considered correct behaviour?

maximskripnik commented 7 years ago

@maggiolo00 Can you please help me with this? The question should not be complex, but it somewhat blocks me.

Thank you

wolf4ood commented 7 years ago

Hi @maximskripnik

why are you trying to load a vertex that does not exist?

What do you expect from that apis?

maximskripnik commented 7 years ago

@maggiolo00 I expect empty list. Please explain the difference between my case and this test: https://github.com/orientechnologies/orientdb-gremlin/blob/master/tests-scala/src/test/scala/OrientSpecBehaviours.scala#L37

The only I see is that there is inmem db used in the test. But shouldn't language be agnostic to the database location?

wolf4ood commented 7 years ago

Hi @maximskripnik

which version are you using?

Yes it should behave the same way

maximskripnik commented 7 years ago

@maggiolo00 I use "3.2.3.0". I can give you complete sbt project with this test, do you need it?

wolf4ood commented 7 years ago

@maximskripnik

let me try it locally. I've tried with the development version 3.0.0-snapshot with remote and it was ok without exception. Let me try with latest stable

maximskripnik commented 7 years ago

Hello @maggiolo00 Any updates on this?

wolf4ood commented 7 years ago

hi @maximskripnik

i've reproduce it. In remote the workflow is different and you get an exception for the record not found. By using OrientDB-Gremlin 3.0.m2 works fine since the check for non existing records has been removed from the Driver. Let me check if we can do something for the release 3.2.3.x in com.michaelpollmeier

maximskripnik commented 7 years ago

@maggiolo00 Thank you for your time. Should I wait for update on this release or better use 3.0.0.M2?

wolf4ood commented 7 years ago

@maximskripnik

depends on your project timeline. 3.0.0.M2 works only with OrientDB 3.0.m2 and the GA will be out Q4 this year. I can fix this and schedule a release if you need it.

Thanks

maximskripnik commented 7 years ago

@maggiolo00 It would be really nice if you could fix this, because waiting for Q4 is not an option.

Thank you!

wolf4ood commented 7 years ago

Hi @maximskripnik

i've pushed a fix for this. I've also updated the ODB and Apache Tinkerpop 3 version.

wolf4ood commented 7 years ago

Hi @mpollmeier

do you think we can schedule the release of 3.2.3.1 on com.michaelpollmeier ?

Thanks

mpollmeier commented 7 years ago

@maggiolo00 it'd be mucher better for all of us if you could release it under com.orientdb. I don't currently use the driver myself. if you have something that needs to be urgently released, I can do it one last time, but otherwise can you please rename the org and release it yourself?

wolf4ood commented 7 years ago

@mpollmeier

ok no problem we'll handle the release. Thanks :)

maximskripnik commented 7 years ago

Hello @maggiolo00 Thank you very much for the fix. Is there an estimate date for this 3.2.3.1 version?

wolf4ood commented 7 years ago

Hi @maximskripnik

we are going to release the driver with com.orientechnologies group id

I think we will reversion it to 2.2.26 in order to have the same release cycle of OrientDB.

It should be released this week i think

maximskripnik commented 7 years ago

Hello @maggiolo00

Any updates on release date for 2.2.26?

wolf4ood commented 7 years ago

Hi @maximskripnik

sorry we didn't make it for 2.2.26. We will make it i think for 2.2.27

wolf4ood commented 6 years ago

hi @maximskripnik

we have released the 2.2.27 version of the driver with this fix Thanks