pietermartin / sqlg

TinkerPop graph over sql
MIT License
243 stars 51 forks source link

Log's timestamp does not match in Java 11 (Zulu JDK) #317

Closed JPMoresmau closed 5 years ago

JPMoresmau commented 5 years ago

I tried for fun to use a non Oracle Java 11 JDK (from https://www.azul.com/downloads/zulu/), and I get this error:

java.lang.IllegalStateException: notify log's timestamp does not match.
        at com.google.common.base.Preconditions.checkState(Preconditions.java:444) ~[guava-20.0.jar:?]
        at org.umlg.sqlg.structure.topology.Topology.fromNotifyJson(Topology.java:1304) ~[sqlg-core-2.0.0.jar:2.0.0]
        at org.umlg.sqlg.sql.dialect.PostgresDialect$TopologyChangeListener.lambda$run$0(PostgresDialect.java:3571) [sqlg-postgres-dialect-2.0.0.jar:2.0.0]

Compared to the Oracle Java 8 JRE I was using, LocalDateTime now has nanoseconds, so I think we compare a time with nanos and a time without. Maybe we should just calculate the difference and fail if it's over a threshold?

pietermartin commented 5 years ago

Was this upgrade on an existing db and it works with Oracle jdk 11 but not the zulu one?

JPMoresmau commented 5 years ago

On a new DB (we wipe out the db for our tests), and zulu 8 works fine, so I'd say it's a Java 11 change, but I haven't tested with an Oracle 11 JRE, no.

Easy65 commented 5 years ago

I had similar issues some time ago, with the same Oracle Java 8 version, only switching branches (at this time we switched to 2.0.0-SNAPSHOT, so there was sometimes still the 1.5.x version in a branch), so I thought this could be the reason. So I think it is not primarily the jdk version.