{"action":"created","issue":{"url":"https://api.github.com/repos/codemix/oriento/issues/331","labels_url":"https://api.github.com/repos/codemix/oriento/issues/331/labels{/name}","comments_url":"https://api.github.com/repos/codemix/oriento/issues/331/comments","events_url":"https://api.github.com/repos/codemix/oriento/issues/331/events","html_url":"https://github.com/codemix/oriento/issues/331","id":89017103,"number":331,"title":"newtork pools cause the cocurrent issue. ","user":{"login":"martingg88","id":7898120,"avatar_url":"https://avatars.githubusercontent.com/u/7898120?v=3","gravatar_id":"","url":"https://api.github.com/users/martingg88","html_url":"https://github.com/martingg88","followers_url":"https://api.github.com/users/martingg88/followers","following_url":"https://api.github.com/users/martingg88/following{/other_user}","gists_url":"https://api.github.com/users/martingg88/gists{/gist_id}","starred_url":"https://api.github.com/users/martingg88/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martingg88/subscriptions","organizations_url":"https://api.github.com/users/martingg88/orgs","repos_url":"https://api.github.com/users/martingg88/repos","events_url":"https://api.github.com/users/martingg88/events{/privacy}","received_events_url":"https://api.github.com/users/martingg88/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-17T13:30:44Z","updated_at":"2015-06-17T15:00:30Z","closed_at":null,"body":"will have transaction roll back if you have more than one pool setup. \r\ni can send you a test script to prove this issue. \r\nlets me know how can i send you the test script."},"comment":{"url":"https://api.github.com/repos/codemix/oriento/issues/comments/112834238","html_url":"https://github.com/codemix/oriento/issues/331#issuecomment-112834238","issue_url":"https://api.github.com/repos/codemix/oriento/issues/331","id":112834238,"user":{"login":"phpnode","id":363611,"avatar_url":"https://avatars.githubusercontent.com/u/363611?v=3","gravatar_id":"","url":"https://api.github.com/users/phpnode","html_url":"https://github.com/phpnode","followers_url":"https://api.github.com/users/phpnode/followers","following_url":"https://api.github.com/users/phpnode/following{/other_user}","gists_url":"https://api.github.com/users/phpnode/gists{/gist_id}","starred_url":"https://api.github.com/users/phpnode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phpnode/subscriptions","organizations_url":"https://api.github.com/users/phpnode/orgs","repos_url":"https://api.github.com/users/phpnode/repos","events_url":"https://api.github.com/users/phpnode/events{/privacy}","received_events_url":"https://api.github.com/users/phpnode/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T15:00:30Z","updated_at":"2015-06-17T15:00:30Z","body":"@martingg88 unrelated to this particular issue but you're really making life hard for yourself by avoiding promises here, oriento was specifically designed to be used with promises. Compare your code above to the promise-driven equivalent:\r\n\r\n```js\r\nvar Bluebird = require('bluebird');\r\n\r\nvar record = {\r\n  'name' : 'demo',\r\n  'metadata'  : {\"genre\":[],\"budget\":0,\"translation\":{\"@type\":\"d\",\"@version\":0,\"title\":[]},\"vote_average\":0,\"type\":\"trailer\",\"production\":{\"@type\":\"d\",\"@version\":0,\"company\":[],\"country\":[]},\"country\":[{\"name\":null,\"code\":\"US\",\"date\":\"\"}],\"title\":\"In Stereo\",\"overview\":\"David and Brenda are perfect for each other, and everyone knows it except David and Brenda. After a break-up, they each experience their own rough patch. For David, a self-destructive artistic endeavor and a relationship with an immature beauty—for Brenda, a failing acting career, an eviction notice, and a boyfriend who just doesn’t do it for her. A chance encounter brings them together on the streets of New York at a particularly bad time. David invites Brenda to the opening of his first photography exhibit and the stage is set for a night of drinking and flirting which leads to an untraditional proposal of how they can be together without getting back together. A sharply observed, un-romantic comedy by writer/director Mel Rodriguez III, IN STEREO is a stylish and striking first feature that offers an unflinching look at the complexity of modern relationships.\",\"source\":{\"@type\":\"d\",\"@version\":0,\"imdb\":\"tt3478186\",\"themoviedb\":340189},\"poster\":\"http://image.tmdb.org/t/p/original/QfnnGjCpvtJ0aY6IWKKnog2viF.jpg\",\"release_date\":\"2015-07-03\",\"language\":\"en\",\"vote_count\":0,\"credit\":{\"@type\":\"d\",\"@version\":0,\"crew\":[],\"actor\":[]},\"release\":{\"@type\":\"d\",\"@version\":0,\"country\":[{\"name\":null,\"code\":\"US\",\"date\":\"2015-07-03\"}]},\"popularity\":0.159291,\"revenue\":0}\r\n};\r\n\r\ndescribe('Database API', function () {\r\n\r\n  before(function () {\r\n    this.timeout(0);\r\n\r\n    this.config = config;\r\n    this.collections = {};\r\n\r\n    this.db = '';\r\n    this.class = '';\r\n    this.rid = '';\r\n\r\n    return TEST_SERVER.create({\r\n      name: this.config.database.name,\r\n      type: 'graph',\r\n      storage: 'plocal'\r\n    })\r\n    .bind(this)\r\n    .then(function(db) {\r\n      this.db = db;\r\n      return db.class.create('test', V);\r\n    })\r\n    .then(function (testClass) {\r\n      this.class = testClass;\r\n      return testClass.property.create([\r\n        {\r\n          name: 'name',\r\n          type: 'String'\r\n        },\r\n        {\r\n          name: 'metadata',\r\n          type: 'EMBEDDEDMAP'\r\n        }\r\n      ]);\r\n    })\r\n    .then(function () {\r\n      return Bluebird.all([\r\n        this.db.index.create({\r\n          name: 'test.name',\r\n          class: 'test',\r\n          properties: 'name',\r\n          type: 'FULLTEXT ENGINE LUCENE'\r\n        }),\r\n        this.db.index.create({\r\n          name: 'test.metadata',\r\n          class: 'test',\r\n          properties: 'metadata',\r\n          type: 'FULLTEXT ENGINE LUCENE',\r\n        })\r\n      ]);\r\n    })\r\n    .then(function () {\r\n      return this.db\r\n        .insert()\r\n        .into('test')\r\n        .set(record)\r\n        .transform({\r\n          '@rid': function (rid) {\r\n              return '#' + rid.cluster + ':' + rid.position;\r\n          }\r\n        })\r\n        .one()\r\n    })\r\n    .then(function (result) {\r\n      this.rid = result['@rid'];\r\n    });\r\n  });\r\n\r\n  after(function () {\r\n    this.timeout(0);\r\n    return TEST_SERVER.drop({\r\n       name: this.config.database.name,\r\n       storage: 'plocal'\r\n     });\r\n  });\r\n\r\n  describe('Db::update()', function () {    \r\n    it('should have transaction rollback', function () {\r\n      this.timeout(0);\r\n      var parallel = [];\r\n      var max_try = 100;\r\n      for(i = 0; i < max_try; i++){\r\n        parallel.push(\r\n          this.db.let('test', function (s) {\r\n            s.insert().into('test').set(record);\r\n          })\r\n          .commit()\r\n          .return('$test')\r\n          .transform({\r\n            '@rid': function (rid) {\r\n              return rid.toString();\r\n            }\r\n          })\r\n          .one()\r\n        );\r\n      }\r\n      return Bluebird.all(parallel);\r\n    });\r\n\r\n  });\r\n});\r\n```\r\n\r\nIt's less than half as long!"}}