{"action":"created","issue":{"url":"https://api.github.com/repos/codecentric/gatling-jdbc/issues/2","repository_url":"https://api.github.com/repos/codecentric/gatling-jdbc","labels_url":"https://api.github.com/repos/codecentric/gatling-jdbc/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/codecentric/gatling-jdbc/issues/2/comments","events_url":"https://api.github.com/repos/codecentric/gatling-jdbc/issues/2/events","html_url":"https://github.com/codecentric/gatling-jdbc/issues/2","id":338788604,"node_id":"MDU6SXNzdWUzMzg3ODg2MDQ=","number":2,"title":"Queries running sequentially and not parallel for virtual users","user":{"login":"hina1234","id":12257414,"node_id":"MDQ6VXNlcjEyMjU3NDE0","avatar_url":"https://avatars3.githubusercontent.com/u/12257414?v=4","gravatar_id":"","url":"https://api.github.com/users/hina1234","html_url":"https://github.com/hina1234","followers_url":"https://api.github.com/users/hina1234/followers","following_url":"https://api.github.com/users/hina1234/following{/other_user}","gists_url":"https://api.github.com/users/hina1234/gists{/gist_id}","starred_url":"https://api.github.com/users/hina1234/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hina1234/subscriptions","organizations_url":"https://api.github.com/users/hina1234/orgs","repos_url":"https://api.github.com/users/hina1234/repos","events_url":"https://api.github.com/users/hina1234/events{/privacy}","received_events_url":"https://api.github.com/users/hina1234/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-07-06T02:58:10Z","updated_at":"2018-07-13T08:08:27Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\nI am trying to use jdbc protocol with 10 virtual users using atOnce(10) where I expected the queries in my data set would run in parallel. But the queries are running sequentially where one user starts and complete the query and then the next query is picked by next user.\r\n"},"comment":{"url":"https://api.github.com/repos/codecentric/gatling-jdbc/issues/comments/404759761","html_url":"https://github.com/codecentric/gatling-jdbc/issues/2#issuecomment-404759761","issue_url":"https://api.github.com/repos/codecentric/gatling-jdbc/issues/2","id":404759761,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDc1OTc2MQ==","user":{"login":"rbraeunlich","id":2596597,"node_id":"MDQ6VXNlcjI1OTY1OTc=","avatar_url":"https://avatars1.githubusercontent.com/u/2596597?v=4","gravatar_id":"","url":"https://api.github.com/users/rbraeunlich","html_url":"https://github.com/rbraeunlich","followers_url":"https://api.github.com/users/rbraeunlich/followers","following_url":"https://api.github.com/users/rbraeunlich/following{/other_user}","gists_url":"https://api.github.com/users/rbraeunlich/gists{/gist_id}","starred_url":"https://api.github.com/users/rbraeunlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rbraeunlich/subscriptions","organizations_url":"https://api.github.com/users/rbraeunlich/orgs","repos_url":"https://api.github.com/users/rbraeunlich/repos","events_url":"https://api.github.com/users/rbraeunlich/events{/privacy}","received_events_url":"https://api.github.com/users/rbraeunlich/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T08:08:27Z","updated_at":"2018-07-13T08:08:27Z","author_association":"COLLABORATOR","body":"Hey @hina1234 \r\nI think I found the problem. It seems like the problem was the call\r\n```\r\nval tried = Try(DB autoCommit { implicit session =>\r\n  SQL(sqlString).map(rs => rs.toMap()).toList().apply()\r\n})\r\n```\r\nAnd the ones in the other action classes accordingly. Since JDBC is blocking, the call waits for it to return. The `session` is not being passed to the next action and therefore everything finishes in order.\r\nWrapping the whole thing in a future should solve this, e.g. like:\r\n```\r\n        val future = Future {\r\n          DB autoCommit { implicit session =>\r\n            SQL(s).execute().apply()\r\n          }\r\n        }\r\n        future.onComplete(result => log(start, nowMillis, result, requestName, session, statsEngine)\r\n        )\r\n```\r\nI will try to find a way to force the simulation to wait for the statements to finish before exiting."}}
{"actor":{"display_login":"rbraeunlich"}}