{"action":"created","issue":{"url":"https://api.github.com/repos/marklogic/marklogic-sesame/issues/140","labels_url":"https://api.github.com/repos/marklogic/marklogic-sesame/issues/140/labels{/name}","comments_url":"https://api.github.com/repos/marklogic/marklogic-sesame/issues/140/comments","events_url":"https://api.github.com/repos/marklogic/marklogic-sesame/issues/140/events","html_url":"https://github.com/marklogic/marklogic-sesame/issues/140","id":104341063,"number":140,"title":"implement write cache","user":{"login":"xquery","id":685000,"avatar_url":"https://avatars.githubusercontent.com/u/685000?v=3","gravatar_id":"","url":"https://api.github.com/users/xquery","html_url":"https://github.com/xquery","followers_url":"https://api.github.com/users/xquery/followers","following_url":"https://api.github.com/users/xquery/following{/other_user}","gists_url":"https://api.github.com/users/xquery/gists{/gist_id}","starred_url":"https://api.github.com/users/xquery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xquery/subscriptions","organizations_url":"https://api.github.com/users/xquery/orgs","repos_url":"https://api.github.com/users/xquery/repos","events_url":"https://api.github.com/users/xquery/events{/privacy}","received_events_url":"https://api.github.com/users/xquery/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/marklogic/marklogic-sesame/labels/Bug","name":"Bug","color":"fc2929"},{"url":"https://api.github.com/repos/marklogic/marklogic-sesame/labels/performance","name":"performance","color":"eb6420"},{"url":"https://api.github.com/repos/marklogic/marklogic-sesame/labels/test","name":"test","color":"006b75"}],"state":"open","locked":false,"assignee":{"login":"srinathgit","id":5034960,"avatar_url":"https://avatars.githubusercontent.com/u/5034960?v=3","gravatar_id":"","url":"https://api.github.com/users/srinathgit","html_url":"https://github.com/srinathgit","followers_url":"https://api.github.com/users/srinathgit/followers","following_url":"https://api.github.com/users/srinathgit/following{/other_user}","gists_url":"https://api.github.com/users/srinathgit/gists{/gist_id}","starred_url":"https://api.github.com/users/srinathgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinathgit/subscriptions","organizations_url":"https://api.github.com/users/srinathgit/orgs","repos_url":"https://api.github.com/users/srinathgit/repos","events_url":"https://api.github.com/users/srinathgit/events{/privacy}","received_events_url":"https://api.github.com/users/srinathgit/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/marklogic/marklogic-sesame/milestones/1","html_url":"https://github.com/marklogic/marklogic-sesame/milestones/marklogic-sesame-1.0.1","labels_url":"https://api.github.com/repos/marklogic/marklogic-sesame/milestones/1/labels","id":1245801,"number":1,"title":"marklogic-sesame-1.0.1","description":"The 1.0.1 release.","creator":{"login":"nwalsh-ml","id":8441564,"avatar_url":"https://avatars.githubusercontent.com/u/8441564?v=3","gravatar_id":"","url":"https://api.github.com/users/nwalsh-ml","html_url":"https://github.com/nwalsh-ml","followers_url":"https://api.github.com/users/nwalsh-ml/followers","following_url":"https://api.github.com/users/nwalsh-ml/following{/other_user}","gists_url":"https://api.github.com/users/nwalsh-ml/gists{/gist_id}","starred_url":"https://api.github.com/users/nwalsh-ml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwalsh-ml/subscriptions","organizations_url":"https://api.github.com/users/nwalsh-ml/orgs","repos_url":"https://api.github.com/users/nwalsh-ml/repos","events_url":"https://api.github.com/users/nwalsh-ml/events{/privacy}","received_events_url":"https://api.github.com/users/nwalsh-ml/received_events","type":"User","site_admin":false},"open_issues":53,"closed_issues":21,"state":"open","created_at":"2015-08-07T16:56:00Z","updated_at":"2015-09-14T19:52:56Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-09-01T19:52:22Z","updated_at":"2015-09-14T21:24:23Z","closed_at":null,"body":"implement write cache to batch up update operations. This is an important optimisation and will push to get this in 1.0-1"},"comment":{"url":"https://api.github.com/repos/marklogic/marklogic-sesame/issues/comments/140209879","html_url":"https://github.com/marklogic/marklogic-sesame/issues/140#issuecomment-140209879","issue_url":"https://api.github.com/repos/marklogic/marklogic-sesame/issues/140","id":140209879,"user":{"login":"srinathgit","id":5034960,"avatar_url":"https://avatars.githubusercontent.com/u/5034960?v=3","gravatar_id":"","url":"https://api.github.com/users/srinathgit","html_url":"https://github.com/srinathgit","followers_url":"https://api.github.com/users/srinathgit/followers","following_url":"https://api.github.com/users/srinathgit/following{/other_user}","gists_url":"https://api.github.com/users/srinathgit/gists{/gist_id}","starred_url":"https://api.github.com/users/srinathgit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srinathgit/subscriptions","organizations_url":"https://api.github.com/users/srinathgit/orgs","repos_url":"https://api.github.com/users/srinathgit/repos","events_url":"https://api.github.com/users/srinathgit/events{/privacy}","received_events_url":"https://api.github.com/users/srinathgit/received_events","type":"User","site_admin":false},"created_at":"2015-09-14T21:24:23Z","updated_at":"2015-09-14T21:24:23Z","body":"I think this may be an issue with cache but I am not sure (or possibly transaction). I see that the test 'testGetStatementsInMultipleContexts' is failing.  The following statements within the test fail with the wire trace provided below and the triples are not inserted.\r\n\r\ntry{\r\n\t\t\ttestAdminCon.begin();\r\n\t\t\ttestAdminCon.add(john, fname, johnfname, dirgraph);\r\n\t\t\ttestAdminCon.add(john, lname, johnlname, dirgraph);\r\n\t\t\ttestAdminCon.add(john, homeTel, johnhomeTel, dirgraph);\r\n\t\t\ttestAdminCon.commit();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\r\n14:17:39.612 [main] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Released connection is reusable.\r\n14:17:39.612 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Releasing connection [{}->http://localhost:8023][null]\r\n14:17:39.613 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Pooling connection [{}->http://localhost:8023][null]; keep alive for 5000 MILLISECONDS\r\n14:17:39.613 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Notifying no-one, there are no waiting threads\r\n14:17:39.613 [main] DEBUG c.m.c.i.JerseyServices - Opening transaction\r\n14:17:39.616 [main] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Get connection: {}->http://localhost:8023, timeout = 0\r\n14:17:39.616 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - [{}->http://localhost:8023] total kept alive: 1, total issued: 1, total allocated: 2 out of 200\r\n14:17:39.617 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Getting free connection [{}->http://localhost:8023][null]\r\n14:17:39.617 [main] DEBUG o.a.h.i.c.DefaultHttpClient - Stale connection check\r\n14:17:39.622 [main] DEBUG o.a.h.c.p.RequestAddCookies - CookieSpec selected: ignoreCookies\r\n14:17:39.623 [main] DEBUG o.a.h.c.p.RequestAuthCache - Auth cache not set in the context\r\n14:17:39.623 [main] DEBUG o.a.h.c.p.RequestProxyAuthentication - Proxy auth state: UNCHALLENGED\r\n14:17:39.623 [main] DEBUG o.a.h.i.c.DefaultHttpClient - Attempt 1 to execute request\r\n14:17:39.623 [main] DEBUG o.a.h.i.c.DefaultClientConnection - Sending request: POST /v1/transactions HTTP/1.1\r\n14:17:39.624 [main] DEBUG o.a.h.wire -  >> \"POST /v1/transactions HTTP/1.1[\\r][\\n]\"\r\n14:17:39.624 [main] DEBUG o.a.h.wire -  >> \"Authorization: Digest username=\"admin\",realm=\"public\",nonce=\"610ba2b5a22d34005feea34816145c7c\",opaque=\"acbad648aeaee9b8\",qop=auth,uri=\"/v1/transactions\",cnonce=\"8eb6c02c\",nc=00000009,response=\"a4ba44470f346a1359435d018e97161d\"[\\r][\\n]\"\r\n14:17:39.625 [main] DEBUG o.a.h.wire -  >> \"Content-Length: 0[\\r][\\n]\"\r\n14:17:39.625 [main] DEBUG o.a.h.wire -  >> \"Host: localhost:8023[\\r][\\n]\"\r\n14:17:39.625 [main] DEBUG o.a.h.wire -  >> \"Connection: Keep-Alive[\\r][\\n]\"\r\n14:17:39.626 [main] DEBUG o.a.h.wire -  >> \"[\\r][\\n]\"\r\n14:17:39.626 [main] DEBUG o.a.h.headers - >> POST /v1/transactions HTTP/1.1\r\n14:17:39.626 [main] DEBUG o.a.h.headers - >> Authorization: Digest username=\"admin\",realm=\"public\",nonce=\"610ba2b5a22d34005feea34816145c7c\",opaque=\"acbad648aeaee9b8\",qop=auth,uri=\"/v1/transactions\",cnonce=\"8eb6c02c\",nc=00000009,response=\"a4ba44470f346a1359435d018e97161d\"\r\n14:17:39.626 [main] DEBUG o.a.h.headers - >> Content-Length: 0\r\n14:17:39.627 [main] DEBUG o.a.h.headers - >> Host: localhost:8023\r\n14:17:39.627 [main] DEBUG o.a.h.headers - >> Connection: Keep-Alive\r\n14:17:39.659 [main] DEBUG o.a.h.wire -  << \"HTTP/1.1 303 See Created Transaction[\\r][\\n]\"\r\n14:17:39.660 [main] DEBUG o.a.h.wire -  << \"Set-Cookie: HostId=14471192489018303339[\\r][\\n]\"\r\n14:17:39.660 [main] DEBUG o.a.h.wire -  << \"Location: /v1/transactions/3893465236721538293[\\r][\\n]\"\r\n14:17:39.660 [main] DEBUG o.a.h.wire -  << \"Server: MarkLogic[\\r][\\n]\"\r\n14:17:39.661 [main] DEBUG o.a.h.wire -  << \"Content-Length: 0[\\r][\\n]\"\r\n14:17:39.661 [main] DEBUG o.a.h.wire -  << \"Connection: Keep-Alive[\\r][\\n]\"\r\n14:17:39.661 [main] DEBUG o.a.h.wire -  << \"Keep-Alive: timeout=5[\\r][\\n]\"\r\n14:17:39.661 [main] DEBUG o.a.h.wire -  << \"[\\r][\\n]\"\r\n14:17:39.661 [main] DEBUG o.a.h.i.c.DefaultClientConnection - Receiving response: HTTP/1.1 303 See Created Transaction\r\n14:17:39.661 [main] DEBUG o.a.h.headers - << HTTP/1.1 303 See Created Transaction\r\n14:17:39.662 [main] DEBUG o.a.h.headers - << Set-Cookie: HostId=14471192489018303339\r\n14:17:39.662 [main] DEBUG o.a.h.headers - << Location: /v1/transactions/3893465236721538293\r\n14:17:39.662 [main] DEBUG o.a.h.headers - << Server: MarkLogic\r\n14:17:39.662 [main] DEBUG o.a.h.headers - << Content-Length: 0\r\n14:17:39.662 [main] DEBUG o.a.h.headers - << Connection: Keep-Alive\r\n14:17:39.662 [main] DEBUG o.a.h.headers - << Keep-Alive: timeout=5\r\n14:17:39.662 [main] DEBUG o.a.h.i.c.DefaultHttpClient - Connection can be kept alive for 5000 MILLISECONDS\r\n14:17:39.663 [main] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Released connection is reusable.\r\n14:17:39.663 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Releasing connection [{}->http://localhost:8023][null]\r\n14:17:39.663 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Pooling connection [{}->http://localhost:8023][null]; keep alive for 5000 MILLISECONDS\r\n14:17:39.663 [main] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Notifying no-one, there are no waiting threads\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"HTTP/1.1 400 Bad Request[\\r][\\n]\"\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"Content-type: application/json; charset=UTF-8[\\r][\\n]\"\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"Server: MarkLogic[\\r][\\n]\"\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"Content-Length: 164[\\r][\\n]\"\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"Connection: Keep-Alive[\\r][\\n]\"\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"Keep-Alive: timeout=5[\\r][\\n]\"\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"[\\r][\\n]\"\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.i.c.DefaultClientConnection - Receiving response: HTTP/1.1 400 Bad Request\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.headers - << HTTP/1.1 400 Bad Request\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.headers - << Content-type: application/json; charset=UTF-8\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.headers - << Server: MarkLogic\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.headers - << Content-Length: 164\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.headers - << Connection: Keep-Alive\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.headers - << Keep-Alive: timeout=5\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.i.c.DefaultHttpClient - Connection can be kept alive for 5000 MILLISECONDS\r\n14:17:40.654 [Timer-1] DEBUG o.a.h.wire -  << \"{\"errorResponse\":{\"statusCode\":400, \"status\":\"Bad Request\", \"messageCode\":\"XDMP-NOTXN\", \"message\":\"XDMP-NOTXN: No transaction with identifier 2718268775740568204\"}}\"\r\n14:17:41.513 [Timer-1] DEBUG o.a.h.i.c.t.ThreadSafeClientConnManager - Released connection is reusable.\r\n14:17:41.513 [Timer-1] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Releasing connection [{}->http://localhost:8023][null]\r\n14:17:41.514 [Timer-1] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Pooling connection [{}->http://localhost:8023][null]; keep alive for 5000 MILLISECONDS\r\n14:17:41.514 [Timer-1] DEBUG o.a.h.i.c.t.ConnPoolByRoute - Notifying no-one, there are no waiting threads\r\norg.openrdf.rio.RDFParseException: Request to MarkLogic server failed, check input is valid.14:17:41.516 [main] DEBUG c.m.s.s.c.WriteCacheTimerTask - flushing write cache\r\n14:17:41.517 [main] DEBUG c.m.c.i.JerseyServices - Posting graphs\r\n\r\n\tat com.marklogic.semantics.sesame.client.MarkLogicClientImpl.performAdd(MarkLogicClientImpl.java:306)\r\n\tat com.marklogic.semantics.sesame.client.MarkLogicClient.sendAdd(MarkLogicClient.java:279)\r\n\tat com.marklogic.semantics.sesame.client.WriteCacheTimerTask.flush(WriteCacheTimerTask.java:145)\r\n\tat com.marklogic.semantics.sesame.client.WriteCacheTimerTask.run(WriteCacheTimerTask.java:118)\r\n\tat java.util.TimerThread.mainLoop(Timer.java:555)\r\n\tat java.util.TimerThread.run(Timer.java:505)"}}