{"action":"created","issue":{"url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/207","repository_url":"https://api.github.com/repos/nats-io/nats-streaming-server","labels_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/207/labels{/name}","comments_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/207/comments","events_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/207/events","html_url":"https://github.com/nats-io/nats-streaming-server/pull/207","id":193669646,"number":207,"title":"Protocol ordering v2","user":{"login":"kozlovic","id":13736691,"avatar_url":"https://avatars.githubusercontent.com/u/13736691?v=3","gravatar_id":"","url":"https://api.github.com/users/kozlovic","html_url":"https://github.com/kozlovic","followers_url":"https://api.github.com/users/kozlovic/followers","following_url":"https://api.github.com/users/kozlovic/following{/other_user}","gists_url":"https://api.github.com/users/kozlovic/gists{/gist_id}","starred_url":"https://api.github.com/users/kozlovic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kozlovic/subscriptions","organizations_url":"https://api.github.com/users/kozlovic/orgs","repos_url":"https://api.github.com/users/kozlovic/repos","events_url":"https://api.github.com/users/kozlovic/events{/privacy}","received_events_url":"https://api.github.com/users/kozlovic/received_events","type":"User","site_admin":false},"labels":[{"id":347661856,"url":"https://api.github.com/repos/nats-io/nats-streaming-server/labels/waffle:needs%20review","name":"waffle:needs review","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-06T02:52:01Z","updated_at":"2016-12-06T02:57:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/nats-io/nats-streaming-server/pulls/207","html_url":"https://github.com/nats-io/nats-streaming-server/pull/207","diff_url":"https://github.com/nats-io/nats-streaming-server/pull/207.diff","patch_url":"https://github.com/nats-io/nats-streaming-server/pull/207.patch"},"body":"Commit 66db13cce9be51130c3295002fdb577c41b1a504 had a performance impact in some cases.\r\nFor instance, running the server like this:\r\n```\r\nnats-streaming-server -store file -dir datastore\r\n```\r\nand then using the bench tool:\r\n```\r\ngo run examples/stan-bench.go -np 1 -ns 10 -n 100000 -a foo\r\n```\r\nproduced the following results:\r\n```\r\nStarting benchmark [msgs=100000, msgsize=128, pubs=1, subs=10]\r\nNATS Streaming Pub/Sub stats: 211,574 msgs/sec ~ 25.83 MB/sec\r\n Pub stats: 19,287 msgs/sec ~ 2.35 MB/sec\r\n Sub stats: 192,340 msgs/sec ~ 23.48 MB/sec\r\n```\r\nWith this PR, the performance is back while solving the ordering issue:\r\n```\r\nStarting benchmark [msgs=100000, msgsize=128, pubs=1, subs=10]\r\nNATS Streaming Pub/Sub stats: 486,028 msgs/sec ~ 59.33 MB/sec\r\n Pub stats: 44,236 msgs/sec ~ 5.40 MB/sec\r\n Sub stats: 441,870 msgs/sec ~ 53.94 MB/sec\r\n```\r\nThis PR has 2 commits, the first is basically reverting commit 66db13cce9be51130c3295002fdb577c41b1a504.\r\nThe second is the actual code to schedule unsub/close request to internal subscribers\r\nto ensure ordering. This was done to facilitate code review."},"comment":{"url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/comments/265046973","html_url":"https://github.com/nats-io/nats-streaming-server/pull/207#issuecomment-265046973","issue_url":"https://api.github.com/repos/nats-io/nats-streaming-server/issues/207","id":265046973,"user":{"login":"coveralls","id":2354108,"avatar_url":"https://avatars.githubusercontent.com/u/2354108?v=3","gravatar_id":"","url":"https://api.github.com/users/coveralls","html_url":"https://github.com/coveralls","followers_url":"https://api.github.com/users/coveralls/followers","following_url":"https://api.github.com/users/coveralls/following{/other_user}","gists_url":"https://api.github.com/users/coveralls/gists{/gist_id}","starred_url":"https://api.github.com/users/coveralls/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coveralls/subscriptions","organizations_url":"https://api.github.com/users/coveralls/orgs","repos_url":"https://api.github.com/users/coveralls/repos","events_url":"https://api.github.com/users/coveralls/events{/privacy}","received_events_url":"https://api.github.com/users/coveralls/received_events","type":"User","site_admin":false},"created_at":"2016-12-06T02:57:28Z","updated_at":"2016-12-06T02:57:28Z","body":"\n[![Coverage Status](https://coveralls.io/builds/9142656/badge)](https://coveralls.io/builds/9142656)\n\nCoverage increased (+0.8%) to 93.586% when pulling **cd1b8f209728d3aa8bacfd032c4bcbe673cd2536 on protocol_ordering_v2** into **c140f226ac786c9469bb611fb32d31523d1ced54 on master**.\n"}}
{"actor":{"display_login":"coveralls"}}