Git Product home page Git Product logo

rdf-delta's Introduction

RDF Delta

RDF Delta provides a system for recording and publishing changes to RDF Datasets. It is built around idea of change logs:

  • RDF Patch - a format for recording changes to an RDF Dataset
  • RDF Patch Log - organise patches in to a log of changes to an RDF Dataset with HTTP access.

RDF Patch Logs can be used for:

  • Replicated datasets - 2 or more copies of a single dataset for high availability of the data.
  • Incremental backup of a dataset.
  • Recording changes
  • Generate alerts based on changes, either to the dataset as a whole or specific resources within the dataset.

RDF Delta provides a system for keeping copies of an RDF Dataset up-to-date using the RDF Patch Log as a journal of changes to be applied.

Documentation

Website: https://afs.github.io/rdf-delta

High Availablity Apache Jena Fuseki

https://afs.github.io/rdf-delta/ha-fuseki.html

Software

Artifacts: https://repo1.maven.org/maven2/org/seaborne/rdf-delta

RDF Delta distribution (patch log server and Apache Jena Fuseki with replicated dataset support)

https://repo1.maven.org/maven2/org/seaborne/rdf-delta/rdf-delta-dist

RDF Patch:

    <dependency>
      <groupId>org.seaborne.rdf-delta</groupId>
      <artifactId>rdf-patch</artifactId>
      <version>X.Y.Z</version>
    </dependency>

RDF Delta client library:

    <dependency>
      <groupId>org.seaborne.rdf-delta</groupId>
      <artifactId>rdf-delta-client</artifactId>
      <version>X.Y.Z</version>
    </dependency>

Contributing

See CONTRIBUTING.

rdf-delta's People

Contributors

acoburn avatar afs avatar bsara avatar bvosburgh-tq avatar codam avatar darrengarvey avatar dependabot-preview[bot] avatar dependabot[bot] avatar juanlongo avatar wwelling avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rdf-delta's Issues

patches applied before fuseki server is started

I'm having a problem because of the fact that the fuseki server is not started before unapplied patches are fetched and applied at server startup time.

Here is the problem:
I'm running the rdf-delta fuseki server in a docker container within a k8s cluster. k8s determines the health of the container by hitting /$/ping of the fuseki server. However, when a patch (or many patches) are so large that they take a long time to sync during startup, the fuseki server takes too long to start, which causes k8s to think that there is something wrong with the server and it is automatically restarted. I've ended up in an infinite bootloop with one of my servers because of this. It seems that it would make more sense to make the fuseki server available as soon as possible so that at least reading can take place on the server immediately.

Basically, I'm requesting that the fuseki server be started immediately on startup rather than waiting to sync any unsynced changes and start syncing the changes once the server has triggered to start.

[bug] version becomes unset when patch not found

I'm running into what seems to be a race condition where one server makes updates to the DB, RDF delta picks them up, the other Fuseki servers try to fetch the new changes, but a null patch is returned and it is seen as "not found". This isn't so much of an issue, the real issue is that whenever this happens the current version of the Fuseki server gets unset, which prevents any patches from being fetched in the future without manually updating the zone state file on the Fuseki servers.

I would expect that if a patch can't be found, that fact would be logged (as it is right now) and the current patch version would remain unchanged so that if the patch does exist in the future, it can be retrieved.

Looking through the code, this block seems to be the culprit:

return Txn.calculateWrite(base, ()->{
Node patchLastIdNode = null;
Version patchLastVersion = Version.UNSET;
for ( long ver = minVersion ; ver <= maxVersion ; ver++ ) {
//FmtLog.debug(LOG, "Play: patch=%s", ver);
RDFPatch patch;
Version verObj = Version.create(ver);
try {
patch = dLink.fetch(datasourceId, verObj);
if ( patch == null ) {
base.commit();
FmtLog.info(LOG, "Play: %s patch=%s : not found", datasourceId, verObj);
continue;
}
} catch (DeltaNotFoundException ex) {
// Which ever way it is signalled. This way means "bad datasourceId"
FmtLog.info(LOG, "Play: %s patch=%s : not found (no datasource)", datasourceId, verObj);
continue;
}
patch.apply(c);
patchLastIdNode = patch.getId();
patchLastVersion = verObj;
}
return Pair.create(patchLastVersion, patchLastIdNode);
});

Specifically the fact that on line 413 the default previous patch version is made to be "unset", then in the block that checks if the patch retrieved is null or not (lines 421-425), the original previous patch version is never restored, causing it to become unset. It seems that this would also happen if the delta server is down or can't be hit for some reason (as indicated by the catch block).

Patch server started with file not issues error on M1 Mac

Although, this is not a serious issue for me, I just realized that the Patchlog server would not work using a file on M1 Mac.

./dcmd server --store PatchStore
[2022-01-03 15:14:07] Delta      INFO  Provider: Local
[2022-01-03 15:14:07] Config     INFO  Delta Server port=1066
[2022-01-03 15:14:07] Delta      INFO  RDF Delta 1.1.0 2021-12-19T17:55:49+0000
[2022-01-03 15:14:07] Delta      INFO    No data sources
[2022-01-03 15:14:34] Delta      ERROR /private/var/folders/30/xrq32v4j71lg9g74s44bv8n00000gq/T/librocksdbjni8940527698892575582.jnilib: dlopen(/private/var/folders/30/xrq32v4j71lg9g74s44bv8n00000gq/T/librocksdbjni8940527698892575582.jnilib, 0x0001): tried: '/private/var/folders/30/xrq32v4j71lg9g74s44bv8n00000gq/T/librocksdbjni8940527698892575582.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni8940527698892575582.jnilib' (no such file)
java.lang.UnsatisfiedLinkError: /private/var/folders/30/xrq32v4j71lg9g74s44bv8n00000gq/T/librocksdbjni8940527698892575582.jnilib: dlopen(/private/var/folders/30/xrq32v4j71lg9g74s44bv8n00000gq/T/librocksdbjni8940527698892575582.jnilib, 0x0001): tried: '/private/var/folders/30/xrq32v4j71lg9g74s44bv8n00000gq/T/librocksdbjni8940527698892575582.jnilib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librocksdbjni8940527698892575582.jnilib' (no such file)
	at jdk.internal.loader.NativeLibraries.load(Native Method) ~[?:?]
	at jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(NativeLibraries.java:383) ~[?:?]
	at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:227) ~[?:?]
	at jdk.internal.loader.NativeLibraries.loadLibrary(NativeLibraries.java:169) ~[?:?]
	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2383) ~[?:?]
	at java.lang.Runtime.load0(Runtime.java:746) ~[?:?]
	at java.lang.System.load(System.java:1857) ~[?:?]
	at org.rocksdb.NativeLibraryLoader.loadLibraryFromJar(NativeLibraryLoader.java:79) ~[delta-server.jar:?]
	at org.rocksdb.NativeLibraryLoader.loadLibrary(NativeLibraryLoader.java:57) ~[delta-server.jar:?]
	at org.rocksdb.RocksDB.loadLibrary(RocksDB.java:69) ~[delta-server.jar:?]
	at org.rocksdb.RocksDB.<clinit>(RocksDB.java:38) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.rdb.RocksDatabase.<clinit>(RocksDatabase.java:29) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.rdb.PatchStoreRocks.lambda$newPatchLog$1(PatchStoreRocks.java:90) ~[delta-server.jar:?]
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708) ~[?:?]
	at org.seaborne.delta.server.local.patchstores.rdb.PatchStoreRocks.newPatchLog(PatchStoreRocks.java:85) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.PatchStore.createPatchLog(PatchStore.java:310) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.PatchStore.createLog(PatchStore.java:239) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.any.PatchStoreAnyLocal.newPatchLog(PatchStoreAnyLocal.java:91) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.PatchStore.createPatchLog(PatchStore.java:310) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.PatchStore.createLog(PatchStore.java:239) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.LocalServer.createDataSource$(LocalServer.java:353) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.LocalServer.createDataSource(LocalServer.java:335) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.LocalServer.createDataSource(LocalServer.java:315) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.DeltaLinkLocal.newDataSource(DeltaLinkLocal.java:99) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.S_DRPC.createDataSource(S_DRPC.java:354) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.S_DRPC.executeAction(S_DRPC.java:175) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.S_DRPC.doPost(S_DRPC.java:60) ~[delta-server.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:523) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87) ~[delta-server.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1624) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:77) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1594) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:506) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.Server.handle(Server.java:562) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:418) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:675) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:410) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.SocketChannelEndPoint$1.run(SocketChannelEndPoint.java:101) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407) [delta-server.jar:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894) [delta-server.jar:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038) [delta-server.jar:?]
	at java.lang.Thread.run(Thread.java:831) [?:?]

Exception is thrown when trying to start a Fuseki instance:

./dcmd fuseki --port 3031 --conf fuseki-config1.ttl               
[2022-01-03 15:14:34] Delta      INFO  Delta Patch Log Servers: [http://localhost:1066/]
[2022-01-03 15:14:34] Zone       INFO  Connection : /Users/A71396588/Documents/projects/rdf-delta-1.1.0/Zone1/ABC
[2022-01-03 15:14:34] HTTP       WARN  Failed : create_datasource {  "name" : "ABC" , "uri" : "delta:ABC" }
500 - Server Error

Compress Patch Log

Is there a way to "compress" or truncate a patch log in combination with a TDB2 backup. I imagine after a longer time of operation the patch log can grow rather large.

Inconsistent reads from a HA Fuseki ensemble

Hi @afs,

I realized now an issue running several HA Fuseki instances.
If my observation is correct a rdf-delta instance will return a query immediately even so its version is not up to date with respect to available patches. They are only starting a sync when the receive any kind of update or in pre-defined time intervals (this is at least my understanding).

If you run rdf-delta instances behind a load balancer which is most probably the way, most people would operate such a HA ensemble, this means you will get non-repeatable reads which can cause real issues (depending on the use case, of course).

Assume an application performs some operation based on he content of the triples in Fuseki, this will create issues.

This could be circumvented, if also queries would trigger a sync first. I could imagine, having a configuration parameter which allows to specify that also queries will trigger a sync.

What do you think?

can't delete anything in the triplestore

I understand that this may be an issue with Fuseki itself. But I figured that I'd start here. I've done lots of googling but can't seem to find the issue anywhere else.

The title says it all. I can't delete any triples from the store.

I have tested this with a stock Fuseki server (I.E. NOT the rdf-delta supplied fuseki server) and I was able to delete records just fine. The only difference between the two instances was the fact that I'm running the rdf-delta version (and the fact that rdf-delta uses the embedded Fuseki rather than the full Fuseki build).

Steps to Reproduce

  1. Upload some data via a POST on the /my-data/data endpoint of the Fuseki server.
  2. Choose some data to delete, then query it to make sure that it's indeed present.
  3. Try to delete the data queried from step 2 using DELETE { ... } WHERE { ... } SPARQL update (you can use a POST with application/sparql-update or multi-part form for the body, neither are working for me).
  4. Run the query you created in step 2.

Result: The data is still present after the second query performed in step 4. Also, an empty patch gets sent to the RDF Delta server...so, I don't believe that the delta server is the issue.

Environment

RDF Delta Version: 0.9.2

RDF Delta Config: My RDF Delta server is connected to a zookeeper instance and stores patches in an S3 bucket. I'm running the delta server using dcmd and I'm also using a custom jetty config to make the delta server use SSL.

Command Used to Run Fuseki:

$ dcmd fuseki --config=/my-fuseki-config.ttl --https=/http_config.json --gzip=on --ping --stats --metrics

Configuration:

# my-fuseki-config.ttl

@prefix delta: <http://jena.apache.org/rdf-delta#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb2: <http://jena.apache.org/2016/tdb#> .

[] rdf:type fuseki:Server ;
  fuseki:services (
    <#myDataService>
  )
.

<#myDataService> a fuseki:Service ;
  fuseki:name "my-data" ;
  fuseki:dataset <#deltaDataset> ;
  fuseki:endpoint [ fuseki: operation fuseki:query; ] ;
  fuseki:endpoint [ fuseki:operation fuseki:query; fuseki:name "query" ] ;
  fuseki:endpoint [ fuseki:operation fuseki:update; ] ;
  fuseki:endpoint [ fuseki:operation fuseki:gsp_r; ] ;
  fuseki:endpoint [ fuseki:operation fuseki:gsp_rw; fuseki:name "data"; ] ;
.

<#deltaDataset> rdf:type delta:DeltaDataset ;
  delta:patchlog "my-service" ;
  delta:zone "my-service-zone" ;
  delta:dataset <#inferredDataset> ;
  delta:changes "https://localhost:1063" ;
.

<#inferredDataset> a ja:RDFDataset ;
  ja:defaultGraph <#inferenceModel> ;
.

<#inferenceModel> a ja:InfModel ;
  ja:baseModel <#tdbGraph> ;
  ja:reasoner [
    ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLMiniFBRuleReasoner>
  ] ;
.

<#tdbGraph> a tdb2:GraphTDB2 ;
  tdb2:location "/fuseki/databases/my-data" ;
.

rdf2patch will flush null characters when character set is larger than 4096

The underlying error has already been reported to Jena as JENA-1920, but I thought it best to record here as well given this is where the issue was uncovered.

When attempting to create a patch file where the source .ttl has a character set larger than 4096 but less than 8192 characters in length will result in null characters being written to the patch file. This in turn will cause a RiotParseException when attempting to send the patch file to the rdf-delta-server.

Using the attached file data.ttl.txt (uploaded as txt)

dcmd r2p data.ttl > data.rdfp

followed by

(assumes the existence of 'examples' log)
dcmd add --server=http://localhost:1066 --log examples data.rdfp

Results in

org.apache.jena.riot.RiotParseException: [line: 6, col: 1 ] Failed to find a prefix name or keyword: (0;0x0000)
	at org.apache.jena.riot.tokens.TokenizerText$ErrorHandlerTokenizer.error(TokenizerText.java:65)
	at org.apache.jena.riot.tokens.TokenizerText.error(TokenizerText.java:1244)
	at org.apache.jena.riot.tokens.TokenizerText.readPrefixedNameOrKeyword(TokenizerText.java:536)
	at org.apache.jena.riot.tokens.TokenizerText.parseToken(TokenizerText.java:445)
	at org.apache.jena.riot.tokens.TokenizerText.hasNext(TokenizerText.java:99)
	at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
	at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:57)
	at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:67)
	at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:182)
	at org.seaborne.delta.cmds.append.toPatch(append.java:106)
	at org.seaborne.delta.cmds.append.exec1(append.java:71)
	at org.seaborne.delta.cmds.append.lambda$execCmd$0(append.java:64)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.seaborne.delta.cmds.append.execCmd(append.java:64)
	at org.seaborne.delta.cmds.DeltaCmd.exec(DeltaCmd.java:107)
	at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
	at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
	at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
	at org.seaborne.delta.cmds.append.main(append.java:47)
	at org.seaborne.delta.cmds.dcmd.main(dcmd.java:125)
	at dcmd.main(dcmd.java:38)

queries are A LOT slower after losing and re-establishing a connection to zookeeper

In the tests that I conducted on my local machine, I was seeing query speeds of ~50ms go to no better than 10 seconds for the same query after re-establishing a lost connection to zookeeper.

Setup

  • single rdf-delta (v1.1.2) server utilizes zookeeper and s3 bucket for storage
  • at least two rdf-delta-fuseki (v1.1.2) servers running and using the single rdf-delta server

Steps to Reproduce

  1. Start zookeeper, s3 bucket, rdf-delta, and all rdf-delta-fuseki servers.
  2. Run the following query against any of the fuseki servers:
    ASK WHERE { ?s ?p ?o }
    You should receive a response very, very quickly (mine usually returned in under 100 ms)
  3. Restart the zookeeper server so that the rdf-delta server looses its connection and has to re-establish it.
  4. After the connection is re-established, submit the query from step 2 to any fuseki server again. The query will take significantly longer to complete and will continue to take a long time to complete until the rdf-delta server is restarted (for me, I couldn't get anything better than a 10 second response time).

RDF Delta Logs

I've added labels to the below log to indicate when each step described above (except for step 1) was performed during the logging.

...3:30,056 DEBUG [main-1]                                                    D.Delta : Connection string: zookeeper:2181
...3:30,073 DEBUG [main-1]                                                    D.Delta : Delta initialization (level 0)
...3:30,074 DEBUG [main-1]                                                    D.Delta : Delta initialization (level 1)
...3:30,077 DEBUG [main-1]                                                    D.Delta : Provider: file
...3:30,077 DEBUG [main-1]                                                    D.Delta : Provider: rdb
...3:30,077 DEBUG [main-1]                                                    D.Delta : Provider: mem
...3:30,077 DEBUG [main-1]                                                    D.Delta : Provider: zk
...3:30,078 DEBUG [main-1]                                                    D.Delta : Provider: Local
...3:30,083 DEBUG [main-1]                                                   D.Config : Setup for provider: zookeeper+s3
...3:31,349  INFO [main-1]                             work.imps.CuratorFrameworkImpl : Starting
...3:31,355 DEBUG [main-1]                             curator.CuratorZookeeperClient : Starting
...3:31,355 DEBUG [main-1]                             apache.curator.ConnectionState : Starting
...3:31,356 DEBUG [main-1]                             apache.curator.ConnectionState : reset
...3:31,362  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:zookeeper.version=3.6.3--6401e4ad2087061bc6b9f80dec2d69f2e3c8660a, built on 04/08/2021 16:35 GMT
...3:31,362  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:host.name=rdf-delta
...3:31,363  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:java.version=11.0.14
...3:31,364  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:java.vendor=Alpine
...3:31,365  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:java.home=/usr/lib/jvm/java-11-openjdk
...3:31,366  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:java.class.path=/opt/rdf-delta/delta-server.jar
...3:31,367  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:java.library.path=/usr/lib/jvm/java-11-openjdk/lib/server:/usr/lib/jvm/java-11-openjdk/lib:/usr/lib/jvm/java-11-openjdk/../lib:/usr/java/packages/lib:/usr/lib64:/lib64:/lib:/usr/lib
...3:31,367  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:java.io.tmpdir=/tmp
...3:31,368  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:java.compiler=<NA>
...3:31,369  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:os.name=Linux
...3:31,370  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:os.arch=amd64
...3:31,371  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:os.version=5.10.104-linuxkit
...3:31,372  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:user.name=root
...3:31,373  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:user.home=/root
...3:31,373  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:user.dir=/opt/rdf-delta
...3:31,374  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:os.memory.free=992MB
...3:31,374  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:os.memory.max=2048MB
...3:31,375  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Client environment:os.memory.total=1024MB
...3:31,384  INFO [main-1]                               o.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=zookeeper:2181 sessionTimeout=10000 watcher=org.apache.curator.ConnectionState@771a7d53
...3:31,394  INFO [main-1]                             ache.zookeeper.common.X509Util : Setting -D jdk.tls.rejectClientInitiatedRenegotiation=true to disable client-initiated TLS renegotiation
...3:31,404  INFO [main-1]                             che.zookeeper.ClientCnxnSocket : jute.maxbuffer value is 1048575 Bytes
...3:31,414  INFO [main-1]                              o.apache.zookeeper.ClientCnxn : zookeeper.request.timeout value is 0. feature enabled=false
...3:31,438 DEBUG [main-SendThread(zookeeper:2181)-14] .zookeeper.SaslServerPrincipal : Canonicalized address to zookeeper.localdev
...3:31,440  INFO [main-1]                             work.imps.CuratorFrameworkImpl : Default schema
...3:31,441  INFO [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Opening socket connection to server zookeeper/172.18.0.2:2181.
...3:31,442  INFO [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : SASL config status: Will not attempt to authenticate using SASL (unknown error)
...3:31,460  INFO [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Socket connection established, initiating session, client: /172.18.0.6:48114, server: zookeeper/172.18.0.2:2181
...3:31,465 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Session establishment request sent on zookeeper/172.18.0.2:2181
...3:31,471  INFO [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Session establishment complete on server zookeeper/172.18.0.2:2181, session id = 0x100006632d40003, negotiated timeout = 10000
...3:31,474 DEBUG [main-EventThread-15]                apache.curator.ConnectionState : Negotiated session timeout: 10000
...3:31,478  INFO [main-EventThread-15]                k.state.ConnectionStateManager : State change: CONNECTED
...3:31,479 DEBUG [main-EventThread-15]                work.imps.CuratorFrameworkImpl : Clearing sleep for 1 operations
...3:31,492 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:/zookeeper/config serverPath:/zookeeper/config finished:false header:: 1,4  replyHeader:: 1,1148278,0  request:: '/zookeeper/config,T  response:: ,s{0,0,0,0,0,0,-1,0,0,0,0}
...3:31,496  INFO [main-EventThread-15]                framework.imps.EnsembleTracker : New config event received: {}
...3:31,496 DEBUG [main-EventThread-15]                framework.imps.EnsembleTracker : Ignoring new config as it is empty
...3:31,497 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:/zookeeper/config serverPath:/zookeeper/config finished:false header:: 2,4  replyHeader:: 2,1148278,0  request:: '/zookeeper/config,T  response:: ,s{0,0,0,0,0,0,-1,0,0,0,0}
...3:31,498  INFO [main-EventThread-15]                framework.imps.EnsembleTracker : New config event received: {}
...3:31,499 DEBUG [main-EventThread-15]                framework.imps.EnsembleTracker : Ignoring new config as it is empty
...3:31,507  INFO [main-1]                             ocal.patchstor.zk.PatchStoreZk : Connecting to zookeeper
...3:31,513 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 3,3  replyHeader:: 3,1148278,0  request:: '/delta,F  response:: s{1148099,1148099,1661472301524,1661472301524,0,3,0,0,0,3,1148109}
...3:31,519 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 4,12  replyHeader:: 4,1148278,0  request:: '/delta/activeLogs,T  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...3:31,524 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 5,4  replyHeader:: 5,1148278,0  request:: '/delta/activeLogs/my-log,F  response:: #7b202022696422203a202269643a61613862623464392d373139662d346362342d616366622d38353561343532333664373722202c20226e616d6522203a2022636f6c6c6563746976652d6f6e746f6c6f677922202c202275726922203a202264656c74613a636f6c6c6563746976652d6f6e746f6c6f677922207d,s{1148121,1148257,1661472334619,1662141396906,2,0,0,0,124,0,1148121}
...3:31,544 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 6,3  replyHeader:: 6,1148278,0  request:: '/delta/logs/my-log,F  response:: s{1148114,1148114,1661472334570,1661472334570,0,6,0,0,0,6,1148120}
...3:31,552 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 7,12  replyHeader:: 7,1148278,0  request:: '/delta/logs/my-log/versions,F  response:: v{'00000001},s{1148117,1148117,1661472334599,1661472334599,0,1,0,0,0,1,1148205}
...3:31,555 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 8,4  replyHeader:: 8,1148278,0  request:: '/delta/logs/my-log/versions/00000001,F  response:: #fffffff164ffffffb224ffffffbaffffff804dffffffbbffffff9a443f43ffffffe314ffffff85ffffff90,s{1148205,1148205,1661472404031,1661472404031,0,0,0,0,16,0,1148205}
...3:31,558 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 9,4  replyHeader:: 9,1148278,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...3:31,576 DEBUG [main-1]                                                    D.Delta : Register datasource: id:aa8bb4
...3:31,578 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 10,4  replyHeader:: 10,1148278,0  request:: '/delta/activeLogs/other-log,F  response:: #7b202022696422203a202269643a65313338366533322d663236382d343465352d383761632d65326637396364376236303322202c20226e616d6522203a2022636d742d6465706c6f7922202c202275726922203a202264656c74613a636d742d6465706c6f7922207d,s{1148134,1148134,1661472335155,1661472335155,0,0,0,0,106,0,1148134}
...3:31,582 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 11,3  replyHeader:: 11,1148278,0  request:: '/delta/logs/other-log,F  response:: s{1148127,1148127,1661472335106,1661472335106,0,6,0,0,0,6,1148133}
...3:31,585 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 12,12  replyHeader:: 12,1148278,0  request:: '/delta/logs/other-log/versions,F  response:: v{},s{1148130,1148130,1661472335119,1661472335119,0,0,0,0,0,0,1148130}
...3:31,588 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 13,4  replyHeader:: 13,1148278,0  request:: '/delta/logs/other-log/state,T  response:: #7b2276657273696f6e22203a2030207d,s{1148129,1148129,1661472335115,1661472335115,0,0,0,0,16,0,1148129}
...3:31,594 DEBUG [main-1]                                                    D.Delta : Register datasource: id:e1386e
...3:31,597 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 14,12  replyHeader:: 14,1148278,0  request:: '/delta/activeLogs,T  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...3:31,601 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 15,12  replyHeader:: 15,1148278,0  request:: '/delta/activeLogs,F  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...3:31,603 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 16,4  replyHeader:: 16,1148278,0  request:: '/delta/logs/my-log/dsd,F  response:: #7b202022696422203a202269643a61613862623464392d373139662d346362342d616366622d38353561343532333664373722202c20226e616d6522203a2022636f6c6c6563746976652d6f6e746f6c6f677922202c202275726922203a202264656c74613a636f6c6c6563746976652d6f6e746f6c6f677922207d,s{1148115,1148115,1661472334574,1661472334574,0,0,0,0,124,0,1148115}
...3:31,607 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 17,4  replyHeader:: 17,1148278,0  request:: '/delta/logs/other-log/dsd,F  response:: #7b202022696422203a202269643a65313338366533322d663236382d343465352d383761632d65326637396364376236303322202c20226e616d6522203a2022636d742d6465706c6f7922202c202275726922203a202264656c74613a636d742d6465706c6f7922207d,s{1148128,1148128,1661472335110,1661472335110,0,0,0,0,106,0,1148128}
...3:31,611 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 18,12  replyHeader:: 18,1148278,0  request:: '/delta/activeLogs,F  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...3:31,613 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 19,12  replyHeader:: 19,1148278,0  request:: '/delta/activeLogs,F  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...3:31,613  INFO [main-1]                                                    D.Delta : Provider: zks3
...3:31,615 DEBUG [main-1]                                                    D.Delta :   [id:aa8bb4, my-log, <delta:my-log>]
...3:31,615 DEBUG [main-1]                                                    D.Delta :   [id:e1386e, other-log, <delta:other-log>]
...3:31,616 DEBUG [main-1]                                                    D.Delta : DataSources: zks3 : [[id:aa8bb4, my-log, <delta:my-log>], [id:e1386e, other-log, <delta:other-log>]]
...3:31,619  INFO [main-1]                                                    D.Config : Delta Server jetty config=/opt/rdf-delta/jetty.xml
...3:31,635  INFO [main-1]                                                    D.Server : Jetty server config file = /opt/rdf-delta/jetty.xml
...3:31,919  INFO [main-1]                                                    D.Delta : RDF Delta 1.1.2 2022-08-17T12:45:57+0000
...3:31,919 DEBUG [main-1]                                                    D.Delta : Server start: port=1063
...3:31,921 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 20,12  replyHeader:: 20,1148278,0  request:: '/delta/activeLogs,F  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...3:31,927 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 21,4  replyHeader:: 21,1148278,0  request:: '/delta/logs/other-log/state,T  response:: #7b2276657273696f6e22203a2030207d,s{1148129,1148129,1661472335115,1661472335115,0,0,0,0,16,0,1148129}
...3:31,929  INFO [main-1]                                                    D.Delta :   Data source: [id:e1386e, other-log, <delta:other-log>] version [0,0] type=zks3
...3:31,932 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 22,4  replyHeader:: 22,1148278,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...3:31,933  INFO [main-1]                                                    D.Delta :   Data source: [id:aa8bb4, my-log, <delta:my-log>] version [1,1] type=zks3
...3:35,270 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 1ms.
...3:38,608 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 1ms.
...3:41,946 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 2ms.
...3:44,362 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 23,4  replyHeader:: 23,1148278,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...3:44,363 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 2ms.

------------------------------------------------------------------------------------------------------------------------------------
  Step 2 query happened here
------------------------------------------------------------------------------------------------------------------------------------

...3:44,371 DEBUG [qtp1482087396-23-23]                                         D.RPC : [1] describe_log {"datasource" : "aa8bb4d9-719f-4cb4-acfb-855a45236d77" } => {  "id" : "id:aa8bb4d9-719f-4cb4-acfb-855a45236d77" , "name" : "my-log" , "uri" : "delta:my-log" , "min_version" : 1 , "max_version" : 1 , "latest" : "id:f164b224-ba80-4dbb-9a44-3f43e3148590" }
...3:47,701 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 2ms.
...3:51,037 DEBUG [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 1ms.

------------------------------------------------------------------------------------------------------------------------------------
  Step 3 zookeeper restart happened here
------------------------------------------------------------------------------------------------------------------------------------

...3:53,710  WARN [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Session 0x100006632d40003 for sever zookeeper/172.18.0.2:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
org.apache.zookeeper.ClientCnxn$EndOfStreamException: Unable to read additional data from server sessionid 0x100006632d40003, likely server has closed socket
	at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:77) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:350) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1290) ~[delta-server.jar:?]
...3:54,998 DEBUG [main-SendThread(zookeeper:2181)-14] .zookeeper.SaslServerPrincipal : Canonicalized address to zookeeper.localdev
...3:54,998  INFO [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Opening socket connection to server zookeeper/172.18.0.2:2181.
...3:54,998  INFO [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : SASL config status: Will not attempt to authenticate using SASL (unknown error)
...3:56,011  WARN [main-SendThread(zookeeper:2181)-14]  o.apache.zookeeper.ClientCnxn : Session 0x100006632d40003 for sever zookeeper/172.18.0.2:2181, Closing socket connection. Attempting reconnect except it is a SessionExpiredException.
java.net.ConnectException: Connection refused
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:777) ~[?:?]
	at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:344) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1290) ~[delta-server.jar:?]
...3:56,012 DEBUG [main-SendThread(zookeeper:2181)-14] .zookeeper.ClientCnxnSocketNIO : Ignoring exception during shutdown input
java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:160) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.shutdownInput(SocketChannelImpl.java:913) ~[?:?]
	at sun.nio.ch.SocketAdaptor.shutdownInput(SocketAdaptor.java:398) ~[?:?]
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:193) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1390) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanAndNotifyState(ClientCnxn.java:1331) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1309) ~[delta-server.jar:?]
...3:56,013 DEBUG [main-SendThread(zookeeper:2181)-14] .zookeeper.ClientCnxnSocketNIO : Ignoring exception during shutdown output
java.nio.channels.ClosedChannelException
	at sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:160) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.shutdownOutput(SocketChannelImpl.java:930) ~[?:?]
	at sun.nio.ch.SocketAdaptor.shutdownOutput(SocketAdaptor.java:406) ~[?:?]
	at org.apache.zookeeper.ClientCnxnSocketNIO.cleanup(ClientCnxnSocketNIO.java:198) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanup(ClientCnxn.java:1390) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.cleanAndNotifyState(ClientCnxn.java:1331) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1309) ~[delta-server.jar:?]
...3:56,116 DEBUG [main-EventThread-15]                o.apache.curator.RetryLoopImpl : Retry-able exception received
org.apache.zookeeper.KeeperException$ConnectionLossException: KeeperErrorCode = ConnectionLoss for /delta/logs/my-log/state
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:102) ~[delta-server.jar:?]
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) ~[delta-server.jar:?]
	at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:2358) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:327) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:316) ~[delta-server.jar:?]
	at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl.pathInForeground(GetDataBuilderImpl.java:313) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:304) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:35) ~[delta-server.jar:?]
	at org.seaborne.delta.zk.Zk.zkFetch(Zk.java:155) ~[delta-server.jar:?]
	at org.seaborne.delta.zk.Zk.zkFetchJson(Zk.java:138) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchLogIndexZk.getWatchedState(PatchLogIndexZk.java:288) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchLogIndexZk.syncState(PatchLogIndexZk.java:282) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchLogIndexZk.lambda$new$0(PatchLogIndexZk.java:112) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:77) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:588) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:563) ~[delta-server.jar:?]
...3:57,714 DEBUG [main-SendThread(zookeeper:2181)-14]  .zookeeper.SaslServerPrincipal : Canonicalized address to zookeeper.localdev
...3:57,715  INFO [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Opening socket connection to server zookeeper/172.18.0.2:2181.
...3:57,716  INFO [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : SASL config status: Will not attempt to authenticate using SASL (unknown error)
...3:57,717  INFO [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Socket connection established, initiating session, client: /172.18.0.6:48126, server: zookeeper/172.18.0.2:2181
...3:57,718 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Session establishment request sent on zookeeper/172.18.0.2:2181
...3:57,739  INFO [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Session establishment complete on server zookeeper/172.18.0.2:2181, session id = 0x100006632d40003, negotiated timeout = 10000
...3:57,748 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 24,101  replyHeader:: 24,1148278,0  request:: 1148278,v{'/zookeeper/config,'/delta/logs/my-log/state,'/delta/logs/other-log/state},v{},v{'/delta/activeLogs}  response:: null
...4:01,081 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 3ms.
...4:02,297 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 25,4  replyHeader:: 25,1148278,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}

------------------------------------------------------------------------------------------------------------------------------------
  Step 4 queries start happening here
------------------------------------------------------------------------------------------------------------------------------------

...4:02,299 DEBUG [qtp1482087396-18-18]                                          D.RPC : [2] describe_log {"datasource" : "aa8bb4d9-719f-4cb4-acfb-855a45236d77" } => {  "id" : "id:aa8bb4d9-719f-4cb4-acfb-855a45236d77" , "name" : "my-log" , "uri" : "delta:my-log" , "min_version" : 1 , "max_version" : 1 , "latest" : "id:f164b224-ba80-4dbb-9a44-3f43e3148590" }
...4:05,614 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 1ms.
...4:06,117 DEBUG [main-EventThread-15]                 o.apache.curator.RetryLoopImpl : Retrying operation
...4:06,119 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 26,4  replyHeader:: 26,1148278,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:06,131 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x100006632d40003, packet:: clientPath:null serverPath:null finished:false header:: 27,4  replyHeader:: 27,1148278,0  request:: '/delta/logs/other-log/state,T  response:: #7b2276657273696f6e22203a2030207d,s{1148129,1148129,1661472335115,1661472335115,0,0,0,0,16,0,1148129}
...4:06,132  INFO [main-EventThread-15]                 k.state.ConnectionStateManager : State change: SUSPENDED
...4:09,470 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 2ms.
...4:12,807 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 1ms.
...4:16,121 DEBUG [main-SendThread(zookeeper:2181)-14]   o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x100006632d40003 after 2ms.
...4:16,132  WARN [Curator-ConnectionStateManager-0-13] k.state.ConnectionStateManager : Session timeout has elapsed while SUSPENDED. Injecting a session expiration. Elapsed ms: 10000. Adjusted session timeout ms: 10000
...4:16,134  INFO [Curator-ConnectionStateManager-0-13] he.zookeeper.ZooKeeperTestable : injectSessionExpiration() called
...4:16,237 DEBUG [main-EventThread-15]                 o.apache.curator.RetryLoopImpl : Retry-able exception received
org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /delta/activeLogs
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:134) ~[delta-server.jar:?]
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) ~[delta-server.jar:?]
	at org.apache.zookeeper.ZooKeeper.getChildren(ZooKeeper.java:2857) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:242) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:231) ~[delta-server.jar:?]
	at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground(GetChildrenBuilderImpl.java:228) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:219) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:41) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchStoreZk.getWatchLogs(PatchStoreZk.java:187) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchStoreZk.lambda$new$1(PatchStoreZk.java:120) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.NamespaceWatcher.process(NamespaceWatcher.java:77) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$EventThread.processEvent(ClientCnxn.java:588) ~[delta-server.jar:?]
	at org.apache.zookeeper.ClientCnxn$EventThread.run(ClientCnxn.java:563) ~[delta-server.jar:?]
...4:21,180 DEBUG [qtp1482087396-24-24]                 o.apache.curator.RetryLoopImpl : Retry-able exception received
org.apache.zookeeper.KeeperException$SessionExpiredException: KeeperErrorCode = Session expired for /delta/logs/my-log/state
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:134) ~[delta-server.jar:?]
	at org.apache.zookeeper.KeeperException.create(KeeperException.java:54) ~[delta-server.jar:?]
	at org.apache.zookeeper.ZooKeeper.getData(ZooKeeper.java:2358) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:327) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl$4.call(GetDataBuilderImpl.java:316) ~[delta-server.jar:?]
	at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:93) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl.pathInForeground(GetDataBuilderImpl.java:313) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:304) ~[delta-server.jar:?]
	at org.apache.curator.framework.imps.GetDataBuilderImpl.forPath(GetDataBuilderImpl.java:35) ~[delta-server.jar:?]
	at org.seaborne.delta.zk.Zk.zkFetch(Zk.java:155) ~[delta-server.jar:?]
	at org.seaborne.delta.zk.Zk.zkFetchJson(Zk.java:138) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchLogIndexZk.getWatchedState(PatchLogIndexZk.java:288) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchLogIndexZk.syncState(PatchLogIndexZk.java:282) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.zk.PatchLogIndexZk.syncVersionInfo(PatchLogIndexZk.java:293) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.patchstores.PatchLogBase.getInfo(PatchLogBase.java:111) ~[delta-server.jar:?]
	at org.seaborne.delta.server.local.DeltaLinkLocal.getPatchLogInfo(DeltaLinkLocal.java:195) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.S_DRPC.describePatchLog(S_DRPC.java:325) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.S_DRPC.executeAction(S_DRPC.java:159) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.S_DRPC.doPost(S_DRPC.java:60) ~[delta-server.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:523) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87) ~[delta-server.jar:?]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:590) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:764) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler$ChainEnd.doFilter(ServletHandler.java:1630) ~[delta-server.jar:?]
	at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:77) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:202) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1600) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:506) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1378) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176) ~[delta-server.jar:?]
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:463) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1300) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.Server.handle(Server.java:562) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpChannel.lambda$handle$0(HttpChannel.java:505) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:762) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:497) ~[delta-server.jar:?]
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:282) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:319) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:530) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:379) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:146) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100) ~[delta-server.jar:?]
	at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:412) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:381) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:268) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.lambda$new$0(AdaptiveExecutionStrategy.java:138) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:407) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:894) ~[delta-server.jar:?]
	at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1038) ~[delta-server.jar:?]
	at java.lang.Thread.run(Thread.java:829) ~[?:?]
...4:26,133  WARN [Curator-ConnectionStateManager-0-13]                            k.state.ConnectionStateManager : Session timeout has elapsed while SUSPENDED. Injecting a session expiration. Elapsed ms: 10001. Adjusted session timeout ms: 10000
...4:26,134 DEBUG [Curator-ConnectionStateManager-0-13]                            apache.curator.ConnectionState : reset
...4:26,134 DEBUG [Curator-ConnectionStateManager-0-13]                              o.apache.zookeeper.ZooKeeper : Close called on already closed client
...4:26,134  INFO [Curator-ConnectionStateManager-0-13]                              o.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=zookeeper:2181 sessionTimeout=10000 watcher=org.apache.curator.ConnectionState@771a7d53
...4:26,135  INFO [Curator-ConnectionStateManager-0-13]                            che.zookeeper.ClientCnxnSocket : jute.maxbuffer value is 1048575 Bytes
...4:26,136  INFO [Curator-ConnectionStateManager-0-13]                             o.apache.zookeeper.ClientCnxn : zookeeper.request.timeout value is 0. feature enabled=false
...4:26,139 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28] .zookeeper.SaslServerPrincipal : Canonicalized address to zookeeper.localdev
...4:26,139  INFO [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Opening socket connection to server zookeeper/172.18.0.2:2181.
...4:26,140  INFO [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : SASL config status: Will not attempt to authenticate using SASL (unknown error)
...4:26,140  INFO [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Socket connection established, initiating session, client: /172.18.0.6:48140, server: zookeeper/172.18.0.2:2181
...4:26,141 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Session establishment request sent on zookeeper/172.18.0.2:2181
...4:26,147  INFO [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Session establishment complete on server zookeeper/172.18.0.2:2181, session id = 0x1000069b68a0000, negotiated timeout = 10000
...4:26,147 DEBUG [Curator-ConnectionStateManager-0-EventThread-29]                apache.curator.ConnectionState : Negotiated session timeout: 10000
...4:26,147  INFO [Curator-ConnectionStateManager-0-EventThread-29]                k.state.ConnectionStateManager : State change: LOST
...4:26,147  INFO [Curator-ConnectionStateManager-0-EventThread-29]                k.state.ConnectionStateManager : State change: RECONNECTED
...4:26,147 DEBUG [Curator-ConnectionStateManager-0-EventThread-29]                work.imps.CuratorFrameworkImpl : Clearing sleep for 0 operations
...4:26,149 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:/zookeeper/config serverPath:/zookeeper/config finished:false header:: 1,4  replyHeader:: 1,1148279,0  request:: '/zookeeper/config,T  response:: ,s{0,0,0,0,0,0,-1,0,0,0,0}
...4:26,150  INFO [Curator-ConnectionStateManager-0-EventThread-29]                framework.imps.EnsembleTracker : New config event received: {}
...4:26,150 DEBUG [Curator-ConnectionStateManager-0-EventThread-29]                framework.imps.EnsembleTracker : Ignoring new config as it is empty
...4:26,237 DEBUG [main-EventThread-15]                                            o.apache.curator.RetryLoopImpl : Retrying operation
...4:26,240 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:null serverPath:null finished:false header:: 2,12  replyHeader:: 2,1148279,0  request:: '/delta/activeLogs,T  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...4:26,243 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:null serverPath:null finished:false header:: 3,4  replyHeader:: 3,1148279,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:26,245 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:null serverPath:null finished:false header:: 4,4  replyHeader:: 4,1148279,0  request:: '/delta/logs/other-log/state,T  response:: #7b2276657273696f6e22203a2030207d,s{1148129,1148129,1661472335115,1661472335115,0,0,0,0,16,0,1148129}
...4:26,246 DEBUG [main-EventThread-15]                                            work.imps.CuratorFrameworkImpl : Clearing sleep for 0 operations
...4:26,248 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:null serverPath:null finished:false header:: 5,12  replyHeader:: 5,1148279,0  request:: '/delta/activeLogs,T  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...4:26,250 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:null serverPath:null finished:false header:: 6,4  replyHeader:: 6,1148279,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:26,252 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:null serverPath:null finished:false header:: 7,4  replyHeader:: 7,1148279,0  request:: '/delta/logs/other-log/state,T  response:: #7b2276657273696f6e22203a2030207d,s{1148129,1148129,1661472335115,1661472335115,0,0,0,0,16,0,1148129}
...4:26,253  WARN [main-EventThread-15]                                            apache.curator.ConnectionState : Session expired event received
...4:26,253 DEBUG [main-EventThread-15]                                            apache.curator.ConnectionState : reset
...4:26,253 DEBUG [main-EventThread-15]                                              o.apache.zookeeper.ZooKeeper : Closing session: 0x1000069b68a0000
...4:26,253 DEBUG [main-EventThread-15]                                             o.apache.zookeeper.ClientCnxn : Closing client for session: 0x1000069b68a0000
...4:26,255 DEBUG [Curator-ConnectionStateManager-0-SendThread(zookeeper:2181)-28]  o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0000, packet:: clientPath:null serverPath:null finished:false header:: 8,-11  replyHeader:: 8,1148280,0  request:: null response:: null
...4:26,256 DEBUG [main-EventThread-15]                                             o.apache.zookeeper.ClientCnxn : Disconnecting client for session: 0x1000069b68a0000
...4:26,358  INFO [main-EventThread-15]                                              o.apache.zookeeper.ZooKeeper : Session: 0x1000069b68a0000 closed
...4:26,358  INFO [main-EventThread-15]                                              o.apache.zookeeper.ZooKeeper : Initiating client connection, connectString=zookeeper:2181 sessionTimeout=10000 watcher=org.apache.curator.ConnectionState@771a7d53
...4:26,358  INFO [main-EventThread-15]                                            che.zookeeper.ClientCnxnSocket : jute.maxbuffer value is 1048575 Bytes
...4:26,360  INFO [main-EventThread-15]                                             o.apache.zookeeper.ClientCnxn : zookeeper.request.timeout value is 0. feature enabled=false
...4:26,361  INFO [main-EventThread-15]                                            k.state.ConnectionStateManager : State change: LOST
...4:26,362 DEBUG [main-SendThread(zookeeper:2181)-30]                             .zookeeper.SaslServerPrincipal : Canonicalized address to zookeeper.localdev
...4:26,362  INFO [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Opening socket connection to server zookeeper/172.18.0.2:2181.
...4:26,362  INFO [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : SASL config status: Will not attempt to authenticate using SASL (unknown error)
...4:26,362  INFO [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Socket connection established, initiating session, client: /172.18.0.6:48142, server: zookeeper/172.18.0.2:2181
...4:26,363 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Session establishment request sent on zookeeper/172.18.0.2:2181
...4:26,368  INFO [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Session establishment complete on server zookeeper/172.18.0.2:2181, session id = 0x1000069b68a0001, negotiated timeout = 10000
...4:26,369 DEBUG [main-EventThread-31]                                            apache.curator.ConnectionState : Negotiated session timeout: 10000
...4:26,369  INFO [main-EventThread-31]                                            k.state.ConnectionStateManager : State change: RECONNECTED
...4:26,370 DEBUG [main-EventThread-31]                                            work.imps.CuratorFrameworkImpl : Clearing sleep for 0 operations
...4:26,374 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 1,12  replyHeader:: 1,1148281,0  request:: '/delta/activeLogs,T  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...4:26,375 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:/zookeeper/config serverPath:/zookeeper/config finished:false header:: 2,4  replyHeader:: 2,1148281,0  request:: '/zookeeper/config,T  response:: ,s{0,0,0,0,0,0,-1,0,0,0,0}
...4:26,376 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 3,4  replyHeader:: 3,1148281,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:26,380  INFO [main-EventThread-31]                                            framework.imps.EnsembleTracker : New config event received: {}
...4:26,381 DEBUG [main-EventThread-31]                                            framework.imps.EnsembleTracker : Ignoring new config as it is empty
...4:26,381 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 4,4  replyHeader:: 4,1148281,0  request:: '/delta/logs/other-log/state,T  response:: #7b2276657273696f6e22203a2030207d,s{1148129,1148129,1661472335115,1661472335115,0,0,0,0,16,0,1148129}
...4:26,383 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 5,4  replyHeader:: 5,1148281,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:26,386 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 6,12  replyHeader:: 6,1148281,0  request:: '/delta/activeLogs,T  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...4:26,386  INFO [Curator-ConnectionStateManager-0-EventThread-29]                 o.apache.zookeeper.ClientCnxn : EventThread shut down for session: 0x1000069b68a0000
...4:26,387 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 7,4  replyHeader:: 7,1148281,0  request:: '/delta/logs/other-log/state,T  response:: #7b2276657273696f6e22203a2030207d,s{1148129,1148129,1661472335115,1661472335115,0,0,0,0,16,0,1148129}
...4:29,724 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x1000069b68a0001 after 1ms.
...4:31,183 DEBUG [qtp1482087396-24-24]                                            o.apache.curator.RetryLoopImpl : Retrying operation
...4:31,186 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 8,4  replyHeader:: 8,1148282,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:31,188 DEBUG [qtp1482087396-24-24]                                                                     D.RPC : [3] describe_log {"datasource" : "aa8bb4d9-719f-4cb4-acfb-855a45236d77" } => {  "id" : "id:aa8bb4d9-719f-4cb4-acfb-855a45236d77" , "name" : "my-log" , "uri" : "delta:my-log" , "min_version" : 1 , "max_version" : 1 , "latest" : "id:f164b224-ba80-4dbb-9a44-3f43e3148590" }
...4:34,524 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x1000069b68a0001 after 1ms.
...4:36,389 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 9,12  replyHeader:: 9,1148282,0  request:: '/delta/activeLogs,T  response:: v{'my-log,'other-log},s{1148109,1148109,1661472301621,1661472301621,0,2,0,0,0,2,1148134}
...4:36,389  INFO [main-EventThread-15]                                             o.apache.zookeeper.ClientCnxn : EventThread shut down for session: 0x100006632d40003
...4:39,725 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x1000069b68a0001 after 1ms.
...4:43,061 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x1000069b68a0001 after 1ms.
...4:44,602 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 10,4  replyHeader:: 10,1148282,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:44,604 DEBUG [qtp1482087396-21-21]                                                                     D.RPC : [4] describe_log {"datasource" : "aa8bb4d9-719f-4cb4-acfb-855a45236d77" } => {  "id" : "id:aa8bb4d9-719f-4cb4-acfb-855a45236d77" , "name" : "my-log" , "uri" : "delta:my-log" , "min_version" : 1 , "max_version" : 1 , "latest" : "id:f164b224-ba80-4dbb-9a44-3f43e3148590" }
...4:47,939 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x1000069b68a0001 after 1ms.
...4:51,277 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x1000069b68a0001 after 2ms.
...4:54,613 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Got ping response for session id: 0x1000069b68a0001 after 1ms.
...4:56,799 DEBUG [main-SendThread(zookeeper:2181)-30]                              o.apache.zookeeper.ClientCnxn : Reading reply session id: 0x1000069b68a0001, packet:: clientPath:null serverPath:null finished:false header:: 11,4  replyHeader:: 11,1148282,0  request:: '/delta/logs/my-log/state,T  response:: #7b20202276657273696f6e22203a2031202c2022696422203a202266313634623232342d626138302d346462622d396134342d33663433653331343835393022207d,s{1148116,1148206,1661472334592,1661472404035,1,0,0,0,66,0,1148116}
...4:56,800 DEBUG [qtp1482087396-24-24]                                                                     D.RPC : [5] describe_log {"datasource" : "aa8bb4d9-719f-4cb4-acfb-855a45236d77" } => {  "id" : "id:aa8bb4d9-719f-4cb4-acfb-855a45236d77" , "name" : "my-log" , "uri" : "delta:my-log" , "min_version" : 1 , "max_version" : 1 , "latest" : "id:f164b224-ba80-4dbb-9a44-3f43e3148590" }

Fuseki setup instructions

Hi,

I'm following the Fuseki HA setup instructions.

I've saved the example config as java -jar delta-fuseki.jar --conf config-1.ttl and ran the following command:

java -jar delta-fuseki.jar --conf config-1.ttl

The server did not start, this was the output:

[2023-09-06 15:10:44] Delta      INFO  Delta Patch Log Servers: [http://localhost:1068/]
POST http://localhost:1068/$/rpc

When I use the Tutorial/fuseki-config.ttl, the server starts fine:

rdf-delta-1.1.2 %  java -jar delta-fuseki.jar --conf ./Tutorial/fuseki-config.ttl                                     
[2023-09-06 15:12:51] Delta      INFO  Delta Patch Log Servers: [http://localhost:1066/]
[2023-09-06 15:12:51] Server     INFO  Apache Jena Fuseki 4.5.0
[2023-09-06 15:12:51] Server     INFO  Configuration file: ./Tutorial/fuseki-config.ttl
[2023-09-06 15:12:51] Server     INFO  Path = /ds
[2023-09-06 15:12:51] Server     INFO  System
[2023-09-06 15:12:51] Server     INFO    Memory: 4,0 GiB
[2023-09-06 15:12:51] Server     INFO    Java:   17.0.7
[2023-09-06 15:12:51] Server     INFO    OS:     Mac OS X 12.6.1 aarch64
[2023-09-06 15:12:51] Server     INFO    PID:    22732
[2023-09-06 15:12:51] Server     INFO  Start Fuseki (http=3030)

It looks like the delta:changes port is incorrect in the inline example: it should be http://localhost:1066/ instead of http://localhost:1068/.

I've opened a PR which fixes this and several typos: #236

Error: Unknown argument: s3Bucket

In trying your tutorial against v1.0.0, I get the following error when I try to connect rdf-delta to s3:

Error: Unknown argument: s3Bucket

This is with the command from the tutorial, i.e.:

dcmd server -zk=localhost:2181 --s3Bucket=mybucket-rdf-delta --s3Keys=~/.aws/config --s3Region=us-east-1

Unable to generate patches from existing TDB triple store

This may as well be my ignorance of how to implement. I am trying to integrate rdf-delta patch server with Vitro. I would like for the patch server to either start from the VIVO, the running application on top of Vitro, or start independently from it. I am able to start the DeltaServer create a DataLink and Zone, but I am unable to have a DeltaClient populate patch logs from the applications TDB triplestore.

Here is the latest attempt:

RDFServiceFactory rdfServiceFactory = contentTripleSource.getRDFServiceFactory();
RDFService rdfService = rdfServiceFactory.getRDFService();
RDFServiceGraph defaultGraph = new RDFServiceGraph(rdfService);
Dataset dataset = contentTripleSource.getDataset();
DatasetGraph datasetGraph = dataset.asDatasetGraph();


FileOps.ensureDir("DeltaServer");
FileOps.clearAll("DeltaServer");
FileOps.ensureDir("Zone");
FileOps.clearAll("Zone");
DeltaServer server = DeltaServer.server(1066, "DeltaServer");
try {
    server.start();
}catch (BindException ex) {
    System.err.println("Can't start the patch log server: " + ex.getMessage());
    System.exit(1);
}

DeltaLink dLink = DeltaLinkHTTP.connect("http://localhost:1066/");
Zone zone = Zone.connect("Zone");

Id dsRef = dLink.newDataSource("Vitro", "http://scholars/Vitro");

DeltaClient deltaClient = DeltaClient.create(zone, dLink);

deltaClient.connectExt(dsRef, datasetGraph, SyncPolicy.TXN_RW);


long ldx1 = Txn.calculateRead(datasetGraph, () -> Iter.count(datasetGraph.find()));
// initial count
System.out.println("\n\n\n\n" + ldx1 + "\n\n\n\n");

ChangeSet changeSet = rdfService.manufactureChangeSet();
Triple triple = new Triple(NodeFactory.createURI("http://localhost:9000/vivo/scholars"), NodeFactory.createURI("http://www.w3.org/2000/01/rdf-schema#label"), NodeFactory.createLiteral("Hello, World!"));
changeSet.addAddition(new ByteArrayInputStream(sparqlTriple(triple).getBytes()), ModelSerializationFormat.N3, defaultGraph.getGraphURI());
// This is how triplestore changes are performed throughout the application
try {
    rdfService.changeSetUpdate(changeSet);
} catch (RDFServiceException e1) {
    e1.printStackTrace();
}

// Direct attempts

Quad quad = SSE.parseQuad("(_ :s :p :o)");

System.out.println("\n\n\n\n\n\n");
long dx1 = Txn.calculateRead(datasetGraph, () -> Iter.count(datasetGraph.find()));
// no change
System.out.println("\n\n\n\n" + dx1 + "\n\n\n\n");
Txn.executeWrite(datasetGraph, ()->datasetGraph.add(quad));
Txn.executeWrite(datasetGraph,()->RDFDataMgr.read(datasetGraph, "data.ttl"));
long dx2 = Txn.calculateRead(datasetGraph, () -> Iter.count(datasetGraph.find()));
// no change
System.out.println("\n\n\n\n" + dx2 + "\n\n\n\n");
System.out.println("\n\n\n\n\n\n");

try (DeltaConnection dConn = deltaClient.get(dsRef)) {
    DatasetGraph dsg = dConn.getDatasetGraph();
    long x0 = Txn.calculateRead(dsg, () -> Iter.count(dsg.find()));
    System.out.println("\n\n\n\n" + x0 + "\n\n\n\n");
    Txn.executeWrite(dsg, ()->dsg.add(quad));
    Txn.executeWrite(dsg,()->RDFDataMgr.read(dsg, "data.ttl"));
    long x1 = Txn.calculateRead(dsg, () -> Iter.count(dsg.find()));
    // no change
    System.out.println("\n\n\n\n" + x1 + "\n\n\n\n");
    Version ver = dConn.getLocalVersion();
    RDFPatch patch1 = dConn.getLink().fetch(dsRef, ver);
    // null, never created
    System.out.println("\n\n\n\n" + patch1 + "\n\n\n\n");
    RDFPatchOps.write(System.out, patch1);
} catch (Exception e) {
    e.printStackTrace();
}

I have had many iterations with no luck. I simply have to be missing something.

Patch conflict

We are running a HA setup with 3 Fuseki servers. Fuseki 4.3.2, rdf-delta: 1.1.0

We are facing a patch conflict error. From the logs it seems that a specific patch log version (306209) version is not found (extract from log file attached). I am wondering how such a case, can happen and what options do we have to somehow fix that without having to wipe everything?

t.log

Should there be an RDF representation for an RDF Patch?

This is really interesting!

I was trying to do something similar but more general (send a SPARQL-like query to an extended Fuseki server; get an HTTP connection that stays open and informs you of the results of your query, updated "continuously" as changes come in).

The protocol I was getting to the point of playing with would:

  1. Use RDF (in any encoding) rather than a specific textual format like RDF Patch.
  2. Describe changes to a SPARQL-like results set, rather than all triples.

I think both of these would make the applications I'm aiming for much easier to write (in JavaScript, probably): instead of parsing RDF Patch, I could decode JSON chunks that describe an ever-growing RDF graph which encodes how my result set changed.

I think one way of thinking about this would be to "expand" RDF Patch to an RDF graph that describes how a specific query's (the universal "SELECT * WHERE { ?s ?p ?o }" query's) result set changed. I was thinking about something like this

_:tx a patch:transaction .
_:tx patch:adds _:binding .
_:binding patch:lets [ patch:variable "s" ; patch:value some:subject ] .
_:binding patch:lets [ patch:variable "p" ; patch:value some:predicate ] .
_:binding patch:lets [ patch:variable "o" ; patch:value some:object ] .

That's more verbose than RDF Patch, but I think the generality is worth it.

How to set owl inference on fuseki with RDF-Delta

I'd configured and used a fuseki like below;

fuseki dataset.ttl

@prefix :      <http://base/#> .
@prefix tdb:   <http://jena.hpl.hp.com/2008/tdb#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ja:    <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .

:service_tdb_all  a                   fuseki:Service ;
        rdfs:label                    "TDB ds" ;
        fuseki:dataset                :dataset ;
        fuseki:name                   "ds" ;
        fuseki:serviceQuery           "query" , "sparql" ;
        fuseki:serviceReadGraphStore  "get" ;
        fuseki:serviceReadWriteGraphStore
                "data" ;
        fuseki:serviceUpdate          "update" ;
        fuseki:serviceUpload          "upload" .

:dataset a ja:RDFDataset ;
    ja:defaultGraph       <#model_inf> ;
    ja:namedGraph
       [ ja:graphName      <https://www.kebhana.com/ontology/no_inf> ;
         ja:graph          <#graph> ] ;
     .

<#model_inf> a ja:InfModel ;
     ja:baseModel <#graph> ;
     ja:reasoner [
         ja:reasonerURL <http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>
     ] .

<#graph> rdf:type tdb:GraphTDB ;
  tdb:dataset :tdb_dataset_readwrite .

:tdb_dataset_readwrite
        a             tdb:DatasetTDB ;
        tdb:location  "/fuseki/databases/ds" .

And I want to apply this configuration code on the fuseki which connected with rdf-delta.
Specifically, I would like to use the inference and synchronization functions, how do I modify the configuraion file?

Thank you.

Patchlog server starts re-syncing

In our setup (see issue #154) we see now all over sudden, the patch log servers trying to resync. Applying all patch log. We didn't have a new Fuseki database or anything else and don't understand what triggers the re-sync. Since we have quite some patches, this takes very long
Any thoughts?

Enable $ endpoints

Fuseki offers a couple of $ endpoints amongst them the compact operation.

We experience in our setup a very fast growing Fuseki DB on which we would like to run a compact operation.

How can the $ endpoints be activated, in particular compact or more generally, how can we run a compact operation on the Fuseki DB?

Example to start

Hello,

This is super interesting ! is there any example to start?

Thank you,
Charbel

Log output after Fuseki has completed a sync

Right now the Fuseki server logs when it starts a sync.
From the logs it is not possible to see when a sync has been completed. In troubleshooting situations this however would be useful.
As far as I can see, there is a commented log statement in the code.

Provide more synchronization options

See discussion #240.

One possibility is a background (non-request) task that polls and sync's the database.

SyncPolicy for DeltaConnections could be used as well - that has policies "sync on read" and "sync on write".

shiro.ini file is ignored by Fuseki server

The Fuseki server seems to be ignoring a shiro.ini file placed in FUSEKI_BASE. Should it be expected to be used or is there a different way to secure the Fuseki endpoints with the rdf-delta fuseki?

ArrayIndexOutOfBoundsException when creating large patches.

The underlying error has already been reported to Jena as JENA-1919, but I thought it best to record here as well given this is where the issue was uncovered.

When attempting to send a large patch where a character set is larger than 8192 characters rdf2patch will throw an ArrayIndexOutofBoundsException.

Converting the attached file large_buffer.ttl.txt (attached as .txt for upload purposes)

dcmd r2p large_buffer.ttl

Which will result in

java.lang.ArrayIndexOutOfBoundsException: 8192
	at org.apache.jena.atlas.io.BufferingWriter.output(BufferingWriter.java:130)
	at org.apache.jena.atlas.io.BufferingWriter.write(BufferingWriter.java:178)
	at org.apache.jena.atlas.io.Writer2.print(Writer2.java:49)
	at org.apache.jena.atlas.lib.EscapeStr.stringEsc(EscapeStr.java:106)
	at org.apache.jena.riot.out.quoted.QuotedStringOutputBase.writeStr(QuotedStringOutputBase.java:42)
	at org.apache.jena.riot.out.NodeFormatterNT.writeEscaped(NodeFormatterNT.java:68)
	at org.apache.jena.riot.out.NodeFormatterNT.formatLitLang(NodeFormatterNT.java:73)
	at org.apache.jena.riot.out.NodeFormatterBase.formatLiteral(NodeFormatterBase.java:64)
	at org.apache.jena.riot.out.NodeFormatterBase.format(NodeFormatterBase.java:41)
	at org.seaborne.patch.text.TokenWriterText$NodeFormatterWrapper.format(TokenWriterText.java:157)
	at org.seaborne.patch.text.TokenWriterText$NodeFormatterBNode.format(TokenWriterText.java:132)
	at org.seaborne.patch.text.TokenWriterText.sendNode(TokenWriterText.java:220)
	at org.seaborne.patch.changes.RDFChangesWriter.output(RDFChangesWriter.java:86)
	at org.seaborne.patch.changes.RDFChangesWriter.output(RDFChangesWriter.java:78)
	at org.seaborne.patch.changes.RDFChangesWriter.add(RDFChangesWriter.java:70)
	at org.seaborne.patch.StreamPatch.triple(StreamPatch.java:64)
	at org.apache.jena.riot.lang.LangTurtle.emit(LangTurtle.java:57)
	at org.apache.jena.riot.lang.LangTurtleBase.emitTriple(LangTurtleBase.java:486)
	at org.apache.jena.riot.lang.LangTurtleBase.objectList(LangTurtleBase.java:352)
	at org.apache.jena.riot.lang.LangTurtleBase.predicateObjectItem(LangTurtleBase.java:288)
	at org.apache.jena.riot.lang.LangTurtleBase.predicateObjectList(LangTurtleBase.java:269)
	at org.apache.jena.riot.lang.LangTurtleBase.triples(LangTurtleBase.java:250)
	at org.apache.jena.riot.lang.LangTurtleBase.triplesSameSubject(LangTurtleBase.java:191)
	at org.apache.jena.riot.lang.LangTurtle.oneTopLevelElement(LangTurtle.java:46)
	at org.apache.jena.riot.lang.LangTurtleBase.runParser(LangTurtleBase.java:91)
	at org.apache.jena.riot.lang.LangBase.parse(LangBase.java:41)
	at org.apache.jena.riot.RDFParserRegistry$ReaderRIOTLang.read(RDFParserRegistry.java:191)
	at org.apache.jena.riot.RDFParser.read(RDFParser.java:352)
	at org.apache.jena.riot.RDFParser.parseURI(RDFParser.java:321)
	at org.apache.jena.riot.RDFParser.parse(RDFParser.java:295)
	at org.apache.jena.riot.RDFParserBuilder.parse(RDFParserBuilder.java:506)
	at org.apache.jena.riot.RDFDataMgr.parseFromURI(RDFDataMgr.java:890)
	at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:680)
	at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:649)
	at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:637)
	at org.apache.jena.riot.RDFDataMgr.parse(RDFDataMgr.java:625)
	at org.seaborne.delta.cmds.rdf2patch.lambda$exec$0(rdf2patch.java:60)
	at java.util.ArrayList.forEach(ArrayList.java:1257)
	at org.seaborne.delta.cmds.rdf2patch.exec(rdf2patch.java:60)
	at jena.cmd.CmdMain.mainMethod(CmdMain.java:93)
	at jena.cmd.CmdMain.mainRun(CmdMain.java:58)
	at jena.cmd.CmdMain.mainRun(CmdMain.java:45)
	at org.seaborne.delta.cmds.rdf2patch.main(rdf2patch.java:35)
	at org.seaborne.delta.cmds.dcmd.main(dcmd.java:130)
	at dcmd.main(dcmd.java:38)

Integration tests fail on Windows

I am trying to build rdf-delta on Windows (e.g. with mvn install); but a number of the tests in rdf-delta-integration-tests fail.

The Maven output is below.

It appears that most of the issues are in setup code that fails because it is encountering directories under target/test/server and target/Zone that have been only partially deleted. These directories are not deleted because some of the files are still open from previous tests. For example, the cleanup code cannot delete the file target/Zone/654321/data/GOSP.dat because another process still has it open. Each of the test suites (e.g. TestRestart) succeeds when run alone, but fails when run within the entire build test execution.

Is there any documentation that can help me figure out what needs to be closed when? I can see the various files being opened and held somewhere underneath a DatasetGraphTransaction, but it is not obvious to me what needs to be closed and cleaned up with each test.

I am guessing this is a Windows-specific issue and the problem is not present on Linux/MacOS?

org.seaborne.delta.TC_DeltaIntegration.txt

Add support to specify zookeeper root dir name

Currently, when using an external zookeeper instance, all data in zookeeper will be stored in /delta. There is no way to configure the name of this directory. Not only is delta a very generic name that could conflict with other services using the same zookeeper server, but it would just be nice to be able to specify what the root directory should be called for the user's convenience.

My particular scenario is that we have a dev environment and a test environment. Both of these environments share the same zookeeper servers. However, we want the data stored in zookeeper to be separate per environment for our rdf-delta server so that changes in one environment won't be expected to be applied to another environment. We already have different s3 buckets configured per environment, we just need the ability to change the name of something like the root directory used by rdf-delta in zookeeper and we will have everything working.

Having a way to define the root dir name via the cli would be ideal.

rdf-delta-fuseki tests are broken and not running in the normal build

I discovered while experimenting with Gradle that the rdf-delta-fuseki test apply_1 is broken. In trying to understand why it wasn't showing in the Maven build, I discovered that it isn't running. Here is the output:

[INFO] --------------< org.seaborne.rdf-delta:rdf-delta-fuseki >---------------
[INFO] Building RDF Delta :: Apache Jena Fuseki Integration 0.9.3-SNAPSHOT [8/14]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce) @ rdf-delta-fuseki ---
[INFO] 
[INFO] --- apache-rat-plugin:0.13:check (rat-checks) @ rdf-delta-fuseki ---
[INFO] Enabled default license matchers.
[INFO] Will parse SCM ignores for exclusions...
[INFO] Finished adding exclusions from SCM ignore files.
[INFO] 62 implicit excludes (use -debug for more details).
[INFO] 31 explicit excludes (use -debug for more details).
[INFO] 5 resources included (use -debug for more details)
[INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 0, approved: 5 licenses.
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ rdf-delta-fuseki ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /home/ubuntu/development/java/rdf-delta/rdf-delta-fuseki/src/main/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ rdf-delta-fuseki ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ rdf-delta-fuseki ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /home/ubuntu/development/java/rdf-delta/rdf-delta-fuseki/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ rdf-delta-fuseki ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ rdf-delta-fuseki ---
[INFO] 
[INFO] ---------< org.seaborne.rdf-delta:rdf-delta-integration-tests >---------
[INFO] Building RDF Delta :: Integration Tests 0.9.3-SNAPSHOT            [9/14]
[INFO] --------------------------------[ jar ]---------------------------------

If the test were running, we'd see something like the following:

[INFO] ------------< org.seaborne.rdf-delta:rdf-delta-server-http >------------
[INFO] Building RDF Delta :: Server (HTTP) 0.9.3-SNAPSHOT                [7/14]
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:3.0.0-M3:enforce (enforce) @ rdf-delta-server-http ---
[INFO] 
[INFO] --- apache-rat-plugin:0.13:check (rat-checks) @ rdf-delta-server-http ---
[INFO] Enabled default license matchers.
[INFO] Will parse SCM ignores for exclusions...
[INFO] Finished adding exclusions from SCM ignore files.
[INFO] 62 implicit excludes (use -debug for more details).
[INFO] 31 explicit excludes (use -debug for more details).
[INFO] 24 resources included (use -debug for more details)
[INFO] Rat check: Summary over all files. Unapproved: 0, unknown: 0, generated: 0, approved: 22 licenses.
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ rdf-delta-server-http ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ rdf-delta-server-http ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ rdf-delta-server-http ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ rdf-delta-server-http ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ rdf-delta-server-http ---
[INFO] 
[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.seaborne.delta.server.http.TS_ServerHTTP
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.063 s - in org.seaborne.delta.server.http.TS_ServerHTTP
[INFO] 
[INFO] Results:
[INFO] 
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO] 
[INFO] 

Dynamic ZooKeeper Ensemble Support

EDIT: This discussion ultimately led to discovering that ZooKeeper supports dynamic ensemble additions and subtractions with the right configuration and that a small change is required in RDF Delta to track those changes.

ZooKeeper's requirement to know about the other nodes at startup creates a surprising amount of difficulty when it comes to designing reproducible infrastructure for a cloud service because the identity and location of nodes are not known until after all the nodes have been bootstrapped. This requires the addition of more components that need to be fault-tolerant whether it be a DNS service that registers predetermined hostnames after the IP addresses are known or a process to dynamically update and restart the nodes based on configuration changes. Both are non-trivial solutions.

Consul provides a distributed Key/Value store similar to ZooKeeper, however, it uses a gossip protocol to discover other servers to form a cluster without any additional components. With some refactoring, it may be possible to provide users the option of one or the other. As it is, it may take me less time to produce a pull request for that than it will take me to design one of the aforementioned solutions to make ZooKeeper usable for my needs.

rdf* additions are being added to patch files as aborts

Inserting triples with rdf* subjects results in several TA lines being added to rdf patch rather than actual triples that should be added.

Steps to reproduce:

  1. Run the following against a fuseki server:
    PREFIX : <urn:data/>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    
    INSERT DATA {
      :blah rdfs:label "Blah" .
      <<:blah rdfs:label "Blah">> rdfs:label "Blah rdf* value" .
    } ;
    • Notice that RDF-Delta logs some errors when this is run.
  2. Fetch the patch created by action in step 1. You will receive something like the following:
    H id <uuid:db11a703-c699-4a1c-8808-6af3ad88c9a0> .
    H prev <uuid:857b45f6-05c1-4b3f-a50d-e817f4c1672a> .
    TX .
    A <urn:data/blah> <http://www.w3.org/2000/01/rdf-schema#label> "Blah" .
    TA .
    TA .
    TA .
    TA .
    TA .
    TA .
    TA .
    TA .
    TC .
    

If you create a turtle file with the data inserted and run it through dcmd r2p <turtle-file>, then it generates what I would expect to see:

H id <uuid:661ae50b-b150-4e34-8cba-912acd164a76> .
TX .
PA "" "urn:data/" .
PA "rdfs" "http://www.w3.org/2000/01/rdf-schema#" .
A <urn:data/blah> <http://www.w3.org/2000/01/rdf-schema#label> "Blah" .
A << <urn:data/blah> <http://www.w3.org/2000/01/rdf-schema#label> "Blah" >> <http://www.w3.org/2000/01/rdf-schema#label> "Blah rdf* value" .
TC .

Here are the exceptions that I see thrown:

org.seaborne.patch.PatchException: [line: 5, col: 3 ] Expect a Node, got [LT2]
  at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.tokenToNode(RDFPatchReaderText.java:196)
  at org.seaborne.patch.text.RDFPatchReaderText.nextNode(RDFPatchReaderText.java:259)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:107)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180)
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

org.seaborne.patch.PatchException: [line: 5, col: 6 ] Expected keyword at start of patch record
  at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:97)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180)
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

org.seaborne.patch.PatchException: [line: 5, col: 22] Expected keyword at start of patch record
  at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:97)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180)
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

org.seaborne.patch.PatchException: [line: 5, col: 67] Expected keyword at start of patch record
  at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:97)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180)
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

org.seaborne.patch.PatchException: [line: 5, col: 74] Expected keyword at start of patch record
  at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:97)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180)
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

org.seaborne.patch.PatchException: [line: 5, col: 77] Expected keyword at start of patch record
 at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:97)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180)
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

org.seaborne.patch.PatchException: [line: 5, col: 122] Expected keyword at start of patch record
  at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:97)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

org.seaborne.patch.PatchException: [line: 5, col: 140] Empty line
  at org.seaborne.patch.text.RDFPatchReaderText.exception(RDFPatchReaderText.java:273)
  at org.seaborne.patch.text.RDFPatchReaderText.doOneLine(RDFPatchReaderText.java:95)
  at org.seaborne.patch.text.RDFPatchReaderText.apply1(RDFPatchReaderText.java:77)
  at org.seaborne.patch.text.RDFPatchReaderText.read(RDFPatchReaderText.java:54)
  at org.seaborne.patch.text.RDFPatchReaderText.apply(RDFPatchReaderText.java:64)
  at org.seaborne.patch.RDFPatchOps.read(RDFPatchOps.java:180)
  at org.seaborne.delta.server.http.LogOp.readPatch(LogOp.java:110)
  at org.seaborne.delta.server.http.LogOp.append(LogOp.java:61)
  at org.seaborne.delta.server.http.S_GetPostLog.executeAction(S_GetPostLog.java:62)
  at org.seaborne.delta.server.http.DeltaServlet.doCommon(DeltaServlet.java:147)
  at org.seaborne.delta.server.http.S_GetPostLog.doPost(S_GetPostLog.java:73)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
  at org.seaborne.delta.server.http.DeltaServlet.service(DeltaServlet.java:87)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
  at org.seaborne.delta.server.http.F_PatchFilter.doFilter(F_PatchFilter.java:129)
  at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:193)
  at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1601)
  at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:548)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
  at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1435)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
  at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:501)
  at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
  at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1350)
  at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
  at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
  at org.eclipse.jetty.server.Server.handle(Server.java:516)
  at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:388)
  at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:633)
  at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:380)
  at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:277)
  at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:540)
  at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:395)
  at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:161)
  at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:105)
  at org.eclipse.jetty.io.ChannelEndPoint$1.run(ChannelEndPoint.java:104)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
  at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
  at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:383)
  at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:882)
  at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1036)
  at java.base/java.lang.Thread.run(Thread.java:834)

DeltaLinkHTTP.retry() without retry mechanism?

When looking at https://github.com/afs/rdf-delta/blob/main/rdf-delta-client/src/main/java/org/seaborne/delta/client/DeltaLinkHTTP.java#L122 there is a mismatch between the comments and the parameters on one hand and the implementation on the other hand.

The comments and the parameters hint at a retry functionality which had possibly been intended, where as the code does not contain such a mechanism. Is this due to a change in plans or due to an oversight in not implementing the retry?

GraalVM Native Image

Considering the role this application fills, it's an excellent candidate for GraalVM's Native Image. I've given it a try, and it seems that the reliance on reflection of slf4j is causing a bit of a problem. I'm including the output of my attempt below. I want to understand this better myself, so I'll likely either open a pull request if one is needed or write a guide here on this ticket for inclusion wherever it may be appropriate.

Error: Unsupported features in 5 methods
Detailed message:
Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.slf4j.impl.StaticMDCBinder.getSingleton(). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace:
        at parsing org.slf4j.MDC.bwCompatibleGetMDCAdapterFromBinder(MDC.java:99)
Call path from entry point to org.slf4j.MDC.bwCompatibleGetMDCAdapterFromBinder():
        no path found from entry point to target method

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved method during parsing: org.slf4j.impl.StaticMarkerBinder.getSingleton(). To diagnose the issue you can use the --allow-incomplete-classpath option. The missing method is then reported at run time when it is accessed the first time.
Trace:
        at parsing org.slf4j.MarkerFactory.bwCompatibleGetMarkerFactoryFromBinder(MarkerFactory.java:61)
Call path from entry point to org.slf4j.MarkerFactory.bwCompatibleGetMarkerFactoryFromBinder():
        no path found from entry point to target method

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.apache.log4j.Logger. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
        at parsing io.netty.util.internal.logging.Log4JLoggerFactory.newInstance(Log4JLoggerFactory.java:38)
Call path from entry point to io.netty.util.internal.logging.Log4JLoggerFactory.newInstance(String):
        no path found from entry point to target method

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.osgi.framework.FrameworkUtil. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
        at parsing org.apache.logging.log4j.core.config.plugins.util.ResolverUtil.loadImplementationsInBundle(ResolverUtil.java:282)
Call path from entry point to org.apache.logging.log4j.core.config.plugins.util.ResolverUtil.loadImplementationsInBundle(ResolverUtil$Test, String):
        no path found from entry point to target method

Error: com.oracle.graal.pointsto.constraints.UnresolvedElementException: Discovered unresolved type during parsing: org.slf4j.ext.EventData. To diagnose the issue you can use the --allow-incomplete-classpath option. The missing type is then reported at run time when it is accessed the first time.
Trace:
        at parsing org.apache.logging.slf4j.EventDataConverter.convertEvent(EventDataConverter.java:33)
Call path from entry point to org.apache.logging.slf4j.EventDataConverter.convertEvent(String, Object[], Throwable):
        at org.apache.logging.slf4j.EventDataConverter.convertEvent(EventDataConverter.java:33)
        at org.apache.logging.slf4j.Log4jLogger.log(Log4jLogger.java:367)
        at org.apache.commons.logging.impl.SLF4JLocationAwareLog.debug(SLF4JLocationAwareLog.java:131)
        at com.amazonaws.http.IdleConnectionReaper.run(IdleConnectionReaper.java:194)
        at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519)
        at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192)
        at com.oracle.svm.core.code.IsolateEnterStub.PosixJavaThreads_pthreadStartRoutine_e1f4a8c0039f8337338252cd8734f63a79b5e3df(generated:0)

Upstream Jena vs rdf-delta: webapp and query UI

I've got the project set up and working well here. Thanks for this.

Not sure if an issue is the best place for discussion so happy to move this elsewhere.

The broad question I have is about how the changes in here are synchronised with upstream jena/fuseki. It looks so far that jena/fuseki itself is a dependency and the pieces here import functionality from jena and add the delta handling and communication with the patch server.

Practically, we find the fuseki UI quite useful (endpoint: /$/server). It's not available through the fuseki in this project and I'm just having a look at whether it can be made available. Is there a known path to doing this sort of thing? Is doing this even a good idea? Seems like it could be a pain to maintain.

Or perhaps there's a much better interface available for visually toying around with fuseki. yasgui is OK, but a bit more basic.

A simpler example than the webapp would be the /$/status endpoint.

Still being new to the codebase (and not at all familiar with Jetty), I'm guessing here. Would it look something like:

  • Add jena-fuseki-webapp as a dependency
  • Import the webapp package
  • Register the servlet in some way or other and make the endpoint fire over to it.

Previous not current

Hello. First of all i want thank you for the work done.
When we deploy delta and patchlog in kubernetes we got some warnings
Deploy is simple - zookeeper, one patchlog and one rdf-delta with s3-compatible app - minio
How to fix it?

[2020-03-02 11:41:53] HTTP       WARN  Patch id:1af6b2 : HTTP bad request: Previous not current: log head=id:206536 : patch previous=id:f896d2
[2020-03-02 11:41:53] Delta      WARN  Failed to commit: Previous not current: log head=id:206536 : patch previous=id:f896d2
[2020-03-02 11:41:53] HTTP       WARN  Patch id:1ed17d : HTTP bad request: Previous not current: log head=id:206536 : patch previous=id:f896d2
[2020-03-02 11:41:53] Delta      WARN  Failed to commit: Previous not current: log head=id:206536 : patch previous=id:f896d2
[2020-03-02 11:41:53] HTTP       WARN  Patch id:af7a96 : HTTP bad request: Previous not current: log head=id:206536 : patch previous=id:f896d2
[2020-03-02 11:41:53] Delta      WARN  Failed to commit: Previous not current: log head=id:206536 : patch previous=id:f896d2
....
[2020-03-02 11:51:44] Delta      WARN  Failed to commit: Previous not current: log head=id:f9545e : patch previous=id:b17239
[2020-03-02 11:51:44] HTTP       WARN  Patch id:2748cb : HTTP bad request: Previous not current: log head=id:f9545e : patch previous=id:b17239
[2020-03-02 11:51:44] Delta      WARN  Failed to commit: Previous not current: log head=id:f9545e : patch previous=id:b17239
[2020-03-02 11:51:50] HTTP       WARN  Patch id:6bc627 : HTTP bad request: Previous not current: log head=id:ee8385 : patch previous=id:71bf14

Get Diff

Hi,

Sorry if this sounds like a stupid question but how exactly do patches help get a diff?

Here is what I did:

I have two RDF files. Let's assume that I am pulling that data from an external source I don't have any control over.

yesterday: test.ttl:

@prefix schema: <http://schema.org/> .

<https://example.com/209350> a schema:ScholarlyArticle .

today: test2.ttl:

@prefix schema: <http://schema.org/> .

<https://example.com/209350> a schema:ScholarlyArticle ;
      schema:name "my article" .

I created two patches from them (https://afs.github.io/rdf-delta/cmds.html):

  • ./rdf-delta-cmds/bin/dcmd rdf2patch test.ttl > patch.txt
  • ./rdf-delta-cmds/bin/dcmd rdf2patch test2.ttl > patch2.txt

patch.txt:

H id <uuid:9224eb1a-2166-4ec9-8826-d5491d65a99f> .
TX .
PA "schema" "http://schema.org/" .
A <https://example.com/209350> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/ScholarlyArticle> .
TC .

patch2.txt:

H id <uuid:f52dff08-a9e5-404a-ab56-e52c9b93cf42> .
TX .
PA "schema" "http://schema.org/" .
A <https://example.com/209350> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/ScholarlyArticle> .
A <https://example.com/209350> <http://schema.org/name> "my article" .
TC .

What I would like to know is that <https://example.com/209350> <http://schema.org/name> "my article" was added when comparing patch 1 and patch 2 (diff between test.ttl and test2.ttl).

This is what I did:
./rdf-delta-cmds/bin/dcmd patch2rdf patch.txt patch2.txt

@prefix schema: <http://schema.org/> .

<https://example.com/209350>
        a            schema:ScholarlyArticle ;
        schema:name  "my article" .

So I think I am missing something fundamental. Is there some example that would clarify this kind of usage?

Thanks a lot and sorry if I got this concept all wrong!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.