This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 7f0990b3 fix(github): add connection id to comments collector (#2402)
7f0990b3 is described below
commit 7f0990b365984d5e99388408957510561223bf93
Author: Warren Chen <[email protected]>
AuthorDate: Fri Jul 1 13:58:02 2022 +0800
fix(github): add connection id to comments collector (#2402)
relate to #2073
---
plugins/github/e2e/raw_tables/_raw_github_api_comments.csv | 8 ++++----
plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv | 2 +-
.../github/e2e/snapshot_tables/_tool_github_issue_comments.csv | 8 ++++----
plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv | 2 +-
plugins/github/e2e/snapshot_tables/issue_comments.csv | 8 ++++----
plugins/github/e2e/snapshot_tables/pull_requests.csv | 2 +-
plugins/github/tasks/comment_collector.go | 5 +++--
7 files changed, 18 insertions(+), 17 deletions(-)
diff --git a/plugins/github/e2e/raw_tables/_raw_github_api_comments.csv
b/plugins/github/e2e/raw_tables/_raw_github_api_comments.csv
index ecac6b17..1acb6d56 100644
--- a/plugins/github/e2e/raw_tables/_raw_github_api_comments.csv
+++ b/plugins/github/e2e/raw_tables/_raw_github_api_comments.csv
@@ -8,10 +8,10 @@ id,params,data,url,input,created_at
3167,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410141732"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410141732"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410141732,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDE0MTczMg=="",""user"":{""login"":""lovelly"",""id"":13118848,""node_id"":""MDQ6VXNlcjEzMTE4ODQ4"",""avatar_url"":""https://avat
[...]
3168,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410143221"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410143221"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410143221,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDE0MzIyMQ=="",""user"":{""login"":""lovelly"",""id"":13118848,""node_id"":""MDQ6VXNlcjEzMTE4ODQ4"",""avatar_url"":""https://avat
[...]
3169,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410147487"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410147487"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410147487,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDE0NzQ4Nw=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://ava
[...]
-3170,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410170764"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410170764"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410170764,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDE3MDc2NA=="",""user"":{""login"":""lovelly"",""id"":13118848,""node_id"":""MDQ6VXNlcjEzMTE4ODQ4"",""avatar_url"":""https://avat
[...]
+3170,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410170764"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410170764"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410170764,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDE3MDc2NA=="",""user"":{""login"":""lovelly"",""id"":13118848,""node_id"":""MDQ6VXNlcjEzMTE4ODQ4"",""avatar_url"":""https://avat
[...]
3171,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410173358"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410173358"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410173358,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDE3MzM1OA=="",""user"":{""login"":""lovelly"",""id"":13118848,""node_id"":""MDQ6VXNlcjEzMTE4ODQ4"",""avatar_url"":""https://avat
[...]
3172,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410204870"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410204870"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410204870,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDIwNDg3MA=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://ava
[...]
-3173,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410205295"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410205295"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410205295,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDIwNTI5NQ=="",""user"":{""login"":""lovelly"",""id"":13118848,""node_id"":""MDQ6VXNlcjEzMTE4ODQ4"",""avatar_url"":""https://avat
[...]
+3173,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410205295"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410205295"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410205295,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDIwNTI5NQ=="",""user"":{""login"":""lovelly"",""id"":13118848,""node_id"":""MDQ6VXNlcjEzMTE4ODQ4"",""avatar_url"":""https://avat
[...]
3174,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410267195"",""html_url"":""https://github.com/panjf2000/ants/issues/6#issuecomment-410267195"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/6"",""id"":410267195,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDI2NzE5NQ=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://ava
[...]
3175,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/410290418"",""html_url"":""https://github.com/panjf2000/ants/issues/5#issuecomment-410290418"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/5"",""id"":410290418,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMDI5MDQxOA=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://ava
[...]
3176,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/411342200"",""html_url"":""https://github.com/panjf2000/ants/issues/7#issuecomment-411342200"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/7"",""id"":411342200,""node_id"":""MDEyOklzc3VlQ29tbWVudDQxMTM0MjIwMA=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://ava
[...]
@@ -72,10 +72,10 @@ id,params,data,url,input,created_at
3231,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/439793939"",""html_url"":""https://github.com/panjf2000/ants/issues/17#issuecomment-439793939"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/17"",""id"":439793939,""node_id"":""MDEyOklzc3VlQ29tbWVudDQzOTc5MzkzOQ=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://a
[...]
3232,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440207809"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440207809"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440207809,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDIwNzgwOQ=="",""user"":{""login"":""kklinan"",""id"":5668717,""node_id"":""MDQ6VXNlcjU2Njg3MTc="",""avatar_url"":""https://ava
[...]
3233,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440263871"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440263871"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440263871,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDI2Mzg3MQ=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://a
[...]
-3234,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440500490"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440500490"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440500490,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDUwMDQ5MA=="",""user"":{""login"":""kklinan"",""id"":5668717,""node_id"":""MDQ6VXNlcjU2Njg3MTc="",""avatar_url"":""https://ava
[...]
+3234,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440500490"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440500490"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440500490,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDUwMDQ5MA=="",""user"":{""login"":""kklinan"",""id"":5668717,""node_id"":""MDQ6VXNlcjU2Njg3MTc="",""avatar_url"":""https://ava
[...]
3235,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440541883"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440541883"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440541883,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDU0MTg4Mw=="",""user"":{""login"":""zplzpl"",""id"":7931755,""node_id"":""MDQ6VXNlcjc5MzE3NTU="",""avatar_url"":""https://avat
[...]
3236,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440605531"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440605531"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440605531,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDYwNTUzMQ=="",""user"":{""login"":""kklinan"",""id"":5668717,""node_id"":""MDQ6VXNlcjU2Njg3MTc="",""avatar_url"":""https://ava
[...]
-3237,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440876192"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440876192"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440876192,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDg3NjE5Mg=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://a
[...]
+3237,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/440876192"",""html_url"":""https://github.com/panjf2000/ants/issues/20#issuecomment-440876192"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/20"",""id"":440876192,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MDg3NjE5Mg=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://a
[...]
3238,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/442366878"",""html_url"":""https://github.com/panjf2000/ants/issues/17#issuecomment-442366878"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/17"",""id"":442366878,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0MjM2Njg3OA=="",""user"":{""login"":""hawklin2017"",""id"":32898629,""node_id"":""MDQ6VXNlcjMyODk4NjI5"",""avatar_url"":""https:
[...]
3239,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/445462719"",""html_url"":""https://github.com/panjf2000/ants/issues/21#issuecomment-445462719"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/21"",""id"":445462719,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0NTQ2MjcxOQ=="",""user"":{""login"":""panjf2000"",""id"":7496278,""node_id"":""MDQ6VXNlcjc0OTYyNzg="",""avatar_url"":""https://a
[...]
3240,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/issues/comments/445496131"",""html_url"":""https://github.com/panjf2000/ants/issues/21#issuecomment-445496131"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/21"",""id"":445496131,""node_id"":""MDEyOklzc3VlQ29tbWVudDQ0NTQ5NjEzMQ=="",""user"":{""login"":""huangjunwen"",""id"":720086,""node_id"":""MDQ6VXNlcjcyMDA4Ng=="",""avatar_url"":""https://
[...]
diff --git a/plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv
b/plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv
index a82e9993..de9168ad 100644
--- a/plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv
+++ b/plugins/github/e2e/raw_tables/_raw_github_api_pull_requests.csv
@@ -4,7 +4,7 @@ id,params,data,url,input,created_at
247,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/8"",""id"":211603583,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjExNjAzNTgz"",""html_url"":""https://github.com/panjf2000/ants/pull/8"",""diff_url"":""https://github.com/panjf2000/ants/pull/8.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/8.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/8"",""number"":8,""state"":""closed"",
[...]
248,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/9"",""id"":212277907,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjEyMjc3OTA3"",""html_url"":""https://github.com/panjf2000/ants/pull/9"",""diff_url"":""https://github.com/panjf2000/ants/pull/9.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/9.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/9"",""number"":9,""state"":""closed"",
[...]
249,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/11"",""id"":216254598,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE2MjU0NTk4"",""html_url"":""https://github.com/panjf2000/ants/pull/11"",""diff_url"":""https://github.com/panjf2000/ants/pull/11.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/11.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/11"",""number"":11,""state"":""clo
[...]
-250,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/13"",""id"":218939809,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE4OTM5ODA5"",""html_url"":""https://github.com/panjf2000/ants/pull/13"",""diff_url"":""https://github.com/panjf2000/ants/pull/13.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/13.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/13"",""number"":13,""state"":""clo
[...]
+250,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/13"",""id"":218939809,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE4OTM5ODA5"",""html_url"":""https://github.com/panjf2000/ants/pull/13"",""diff_url"":""https://github.com/panjf2000/ants/pull/13.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/13.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/13"",""number"":13,""state"":""clo
[...]
251,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/14"",""id"":219363161,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE5MzYzMTYx"",""html_url"":""https://github.com/panjf2000/ants/pull/14"",""diff_url"":""https://github.com/panjf2000/ants/pull/14.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/14.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/14"",""number"":14,""state"":""clo
[...]
252,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/15"",""id"":219936521,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjE5OTM2NTIx"",""html_url"":""https://github.com/panjf2000/ants/pull/15"",""diff_url"":""https://github.com/panjf2000/ants/pull/15.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/15.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/15"",""number"":15,""state"":""clo
[...]
253,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}","{""url"":""https://api.github.com/repos/panjf2000/ants/pulls/16"",""id"":222703171,""node_id"":""MDExOlB1bGxSZXF1ZXN0MjIyNzAzMTcx"",""html_url"":""https://github.com/panjf2000/ants/pull/16"",""diff_url"":""https://github.com/panjf2000/ants/pull/16.diff"",""patch_url"":""https://github.com/panjf2000/ants/pull/16.patch"",""issue_url"":""https://api.github.com/repos/panjf2000/ants/issues/16"",""number"":16,""state"":""clo
[...]
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_issue_comments.csv
b/plugins/github/e2e/snapshot_tables/_tool_github_issue_comments.csv
index 97c876d5..a36906cc 100644
--- a/plugins/github/e2e/snapshot_tables/_tool_github_issue_comments.csv
+++ b/plugins/github/e2e/snapshot_tables/_tool_github_issue_comments.csv
@@ -3,10 +3,10 @@
connection_id,github_id,issue_id,body,author_username,author_user_id,github_crea
1,410141732,347255859,"""切片如下\r\n\r\n这里等待锁\r\n9913 @ 0x42c73a 0x42c7ee
0x43cf64 0x43cc7d 0x46dfe8 0x7b28e0 0x7b2be5
0x4591f1\r\n#\t0x43cc7c\tsync.runtime_SemacquireMutex+0x3c\t\t\t\tE:/go/src/runtime/sema.go:71\r\n#\t0x46dfe7\tsync.(*Mutex).Lock+0x107\t\t\t\t\tE:/go/src/sync/mutex.go:134\r\n#\t0x7b28df\tmp/vendor/github.com/panjf2000/ants.(*Pool).putWorker+0x6f\tF:/gowork/src/mp/vendor/github.com/panjf2000/ants/pool.go:229\r\n#\t0x7b2be4\tmp/vendor/github.com/panjf2000/ants.(*Worker).run
[...]
1,410143221,347255859,"""加了锁之后有下标溢出了。。。\r\npanic: runtime error: index out of
range\r\n\r\ngoroutine 7
[running]:\r\nmp/vendor/github.com/panjf2000/ants.(*Pool).getWorker(0xc4200b6460,
0xc4202a6e01)\r\n\tF:/gowork/src/mp/vendor/github.com/panjf2000/ants/pool.go:213
+0x2ce\r\nmp/vendor/github.com/panjf2000/ants.(*Pool).Submit(0xc4200b6460,
0xc4223d47d0, 0x0,
0x0)\r\n\tF:/gowork/src/mp/vendor/github.com/panjf2000/ants/pool.go:125
+0x62\r\n""",lovelly,13118848,2018-08-03T04:46:13.000+00:00, [...]
1,410147487,347255859,"""@lovelly
我查了源码,怎么行数和你说的有点对不上,你的代码更新到最新了吗?""",panjf2000,7496278,2018-08-03T05:21:03.000+00:00,2018-08-03T05:21:13.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3169,
-1,410170764,347255859,"""是最新的代码,我有添加一些print 所以行数不一样,这确实是一个bug 9913个协程阻塞在了
putWorker
很久很久。,。。。""",lovelly,13118848,2018-08-03T07:33:21.000+00:00,2018-08-03T07:33:21.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3170,
+1,410170764,347255859,"""😄 😄 😄 是最新的代码,我有添加一些print 所以行数不一样,这确实是一个bug
9913个协程阻塞在了 putWorker
很久很久。,。。。""",lovelly,13118848,2018-08-03T07:33:21.000+00:00,2018-08-03T07:33:21.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3170,
1,410173358,347255859,"""\r\n
我idleWorkers 为空的, 但是我有n个协程阻塞在了 204行的\t<-p.freeSignal,
这时候来了一个worker被放入idleWorkers, 很巧的是一个协程在putWorker结束锁后,在190行的p.lock.Lock()拿到了锁,这时候
n := len(idleWorkers) - 1 结果是0 这个协程很高兴的进入了接下来的else分支,
然而不幸发生了,p.freeSignal的信号确被早已等在 204行的若干个协程中的一个拿走了, 那么 可怜的协程拿到了锁, 确无法等到
p.freeSignal p.freeSignal要拿到锁才能产生信号,
然后就。,。。""",lovelly,13118848,2018-08-03T07:44:32.000+00:00 [...]
1,410204870,347255859,"""@lovelly
检查了一下,的确可能会有这个问题,这两天我会修复;\r\n另外,我测试的时候试过1000w的量都没发现过这个问题,可能是我每个任务的执行时间太短了,所以我想问下你的任务量有多大以及每个任务的耗时大概是多少?""",panjf2000,7496278,2018-08-03T09:51:15.000+00:00,2018-08-03T09:52:04.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3172,
-1,410205295,347255859,"""我任务耗时从0秒到60秒之间。。。""",lovelly,13118848,2018-08-03T09:53:00.000+00:00,2018-08-03T09:53:00.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3173,
+1,410205295,347255859,"""😄 😄 😄
我任务耗时从0秒到60秒之间。。。""",lovelly,13118848,2018-08-03T09:53:00.000+00:00,2018-08-03T09:53:00.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3173,
1,410267195,347255859,"""@lovelly
应该已经修复了,可以再试试""",panjf2000,7496278,2018-08-03T14:15:45.000+00:00,2018-08-03T14:15:45.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3174,
1,410290418,346842831,"""具体问题可以看 #6
""",panjf2000,7496278,2018-08-03T15:32:00.000+00:00,2018-08-03T15:32:00.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3175,
1,411342200,348630179,"""@huiwq1990
谢谢指出,今天会修复这个问题。""",panjf2000,7496278,2018-08-08T09:17:30.000+00:00,2018-08-08T09:17:30.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3176,
@@ -31,10 +31,10 @@
connection_id,github_id,issue_id,body,author_username,author_user_id,github_crea
1,439793939,381941219,"""release的确有这个问题,目前还没有比较好的办法,只是等待定时销毁的那个goroutine去释放内存,你要是有兴趣可以再想想有没有更好的办法,可以提个pr""",panjf2000,7496278,2018-11-19T07:18:05.000+00:00,2018-11-19T07:18:05.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3231,
1,440207809,382574800,"""https://github.com/panjf2000/ants/blob/711dbdb7a222771ce15aaee1bb7b7c6e9731f208/pool.go#L119""",kklinan,5668717,2018-11-20T09:41:24.000+00:00,2018-11-20T09:41:24.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3232,
1,440263871,382574800,"""这里可以讨论下,是否可以在任务函数里通过闭包的形式,将结果存入channel,满足你的需求?""",panjf2000,7496278,2018-11-20T12:56:13.000+00:00,2018-11-20T12:56:13.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3233,
-1,440500490,382574800,""">
这里可以讨论下,是否可以在任务函数里通过闭包的形式,将结果存入channel,满足你的需求?\r\n\r\n可以的。但不仅仅如此,最重要的是想得到哪条消息失败了,方便进行下次延时处理或丢回队列。""",kklinan,5668717,2018-11-21T02:00:22.000+00:00,2018-11-21T02:00:22.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3234,
+1,440500490,382574800,""">
这里可以讨论下,是否可以在任务函数里通过闭包的形式,将结果存入channel,满足你的需求?\r\n\r\n可以的。但不仅仅如此,最重要的是想得到哪条消息失败了,方便进行❓下次延时处理或丢回队列。""",kklinan,5668717,2018-11-21T02:00:22.000+00:00,2018-11-21T02:00:22.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3234,
1,440541883,382574800,"""目前可以通过参数来传入处理失败的chan\r\n\r\ntype msg struct
{\r\n……\r\nFailed chan<- *msg\r\n}\r\n\r\n// payload == &msg\r\npool,_:=
NewPoolWithFunc(10,func(payload interface{}) error{\r\n……\r\n// 失败的话payload 发送到
Failed
chan\r\n})\r\n\r\npool.Serve(msg)""",zplzpl,7931755,2018-11-21T05:57:51.000+00:00,2018-11-21T06:06:47.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3235,
1,440605531,382574800,"""> 目前可以通过参数来传入处理失败的chan\r\n> \r\n> type msg struct
{\r\n> ……\r\n> Failed chan<- *msg\r\n> }\r\n> \r\n> // payload == &msg\r\n>
pool,_:= NewPoolWithFunc(10,func(payload interface{}) error{\r\n> ……\r\n> //
失败的话payload 发送到 Failed chan\r\n> })\r\n> \r\n>
pool.Serve(msg)\r\n\r\n我目前的做法是没有用 `NewPoolWithFunc()`,而是用的
`ants.NewPool()`,控制整个服务只有一个`pool`,所有的任务都是从大`pool`里取:\r\n\r\n```\r\nfunc (w
*Worker) Register(fn func() error, opts ...Option) error {\r\n\t// w.Workers =
appe [...]
-1,440876192,382574800,"""错误返回,按照ants的设计,其实应该是异步的,目前没办法直接return
error到调用的函数里,所以我觉得就算是处理也应该是异步的方式;至于任务依赖,目前想到的有两种办法:1.回调函数;2.消息通知(通过channel或消息队列),至于是不是要把这些复杂的逻辑加到ants里,有待商榷,或者你也可以推一个pr,大家一起探讨下~~""",panjf2000,7496278,2018-11-22T01:09:56.000+00:00,2018-11-22T01:09:56.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3237,
+1,440876192,382574800,"""错误返回,按照ants的设计,其实应该是异步的,目前没办法直接return
error到调用的函数里,所以我觉得就算是处理也应该是异步的方式;至于任务依赖,❓目前想到的有两种办法:1.回调函数;2.消息通知(通过channel或消息队列),至于是不是要把这些复杂的逻辑加到ants里,有待商榷,或者你也可以推一个pr,大家一起探讨下~~""",panjf2000,7496278,2018-11-22T01:09:56.000+00:00,2018-11-22T01:09:56.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3237,
1,442366878,381941219,"""在 pool里面加上一个 waitgroup,每次 启动一个 work,调用
waitgroup.Add(),协程执行完了就执行waitgroup.Done()。在release时候调用waitgroup.Wait()。最后再回收空闲
worker。不过b如果 worker 对于的 func
执行时间过长,会导致release一直等待。""",hawklin2017,32898629,2018-11-28T08:48:17.000+00:00,2018-11-28T08:48:17.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3238,
1,445462719,388907811,"""你的go版本是多少?""",panjf2000,7496278,2018-12-08T14:20:26.000+00:00,2018-12-08T14:20:26.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3239,
1,445496131,388907811,"""go version go1.11.1
darwin/amd64\r\n\r\n我也尝试了将几个参数调小一点,结果都是 Semaphore 和 AntsPool
量级上都是差不多的""",huangjunwen,720086,2018-12-08T22:56:54.000+00:00,2018-12-08T22:56:54.000+00:00,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_comments,3240,
diff --git a/plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv
b/plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv
index 4ffc601a..c44d7074 100644
--- a/plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv
+++ b/plugins/github/e2e/snapshot_tables/_tool_github_pull_requests.csv
@@ -3,7 +3,7 @@
connection_id,github_id,repo_id,number,state,title,github_created_at,github_upda
1,211603583,134018330,8,closed,fix goroutine
leak,2018-08-29T01:35:54.000+00:00,2018-10-30T00:12:13.000+00:00,2018-10-30T00:12:13.000+00:00,0,0,0,0,0,0,,"""n++,
will cause workers[0]
leak""",,,74ba726f34abe487b7defac6bb9bebf24d342377,dev,master,666635c65d8d3bb1223b819325e0bd23c81f2733,afd687164b13280199208ec4869709edcf02b52d,https://github.com/panjf2000/ants/pull/8,hongli-my,8597823,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,247,
1,212277907,134018330,9,closed,Update
pool.go,2018-08-31T05:29:36.000+00:00,2018-08-31T13:40:33.000+00:00,2018-08-31T13:40:33.000+00:00,0,0,0,0,0,0,,"""#活着的孩子不想当孤儿\r\n\tHopefully:\r\n\tchildren
:= []*child{C1,C2,C3,C4,C5,C6,C7}\r\n\tIn fact:\r\n\tchildren :=
[]*child{C1,C4,C2,C3,C5,C6,C7}""",,,f14d3f91f68d0bc23fe42aa413e98005f6575045,patch-1,master,666635c65d8d3bb1223b819325e0bd23c81f2733,2726d42ea62857283ee73ef3611e379b60974ad2,https://github.com/panjf2000/ants/pull/9,Nonnnnnnnnn,428082
[...]
1,216254598,134018330,11,closed,graceful
exit,2018-09-18T10:15:01.000+00:00,2018-12-03T03:52:35.000+00:00,2018-12-03T03:52:35.000+00:00,0,0,0,0,0,0,,"""graceful
exit""",,,6a87067eb3d6440e5db17f31d4bc12ac291633f4,master,develop,833b6e29acfb2f16e3cf7fc92c79763847c319f4,a03eccc794870f0a2e55a5cb8344ea47f2a0001d,https://github.com/panjf2000/ants/pull/11,shanhuhai5739,3794113,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requests,249,
-1,218939809,134018330,13,closed,解决死循环导致cpu占用率过高,2018-09-28T11:37:28.000+00:00,2018-09-29T11:29:54.000+00:00,2018-09-29T11:29:54.000+00:00,0,0,0,0,0,0,2018-09-29T11:29:54.000+00:00,"""使用了cond
条件变量来阻塞Submit
goroutine。潘少,你再仔细琢磨琢磨,看下有何不妥?""",,,9a3b5cd25344822bca7684f87d9e123890a7bf59,master,master,af376f1b7b59dc488458bcecd4273f0fcde33c55,1846b4392a3a20e6bf1a7431b67f86bd43e0f0b9,https://github.com/panjf2000/ants/pull/13,liyonglion,12890888,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo""
[...]
+1,218939809,134018330,13,closed,❓解决死循环导致cpu占用率过高,2018-09-28T11:37:28.000+00:00,2018-09-29T11:29:54.000+00:00,2018-09-29T11:29:54.000+00:00,0,0,0,0,0,0,2018-09-29T11:29:54.000+00:00,"""使用了cond
条件变量来阻塞Submit
goroutine。潘少,你再仔细琢磨琢磨,看下有何不妥?""",,,9a3b5cd25344822bca7684f87d9e123890a7bf59,master,master,af376f1b7b59dc488458bcecd4273f0fcde33c55,1846b4392a3a20e6bf1a7431b67f86bd43e0f0b9,https://github.com/panjf2000/ants/pull/13,liyonglion,12890888,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"
[...]
1,219363161,134018330,14,closed,Remove meaningless if
statements,2018-10-01T12:48:11.000+00:00,2018-10-02T13:52:27.000+00:00,2018-10-02T13:52:27.000+00:00,0,0,0,0,0,0,2018-10-02T13:52:27.000+00:00,"""""",,,29730bb70343924a2f56a13a9799611dd1cd27fd,master,master,1b62696050b7030106291980d5220f886b017eff,5ed168767a771e3802252020b9821610380ed1a4,https://github.com/panjf2000/ants/pull/14,SimePel,20608155,"{""ConnectionId"":1,""Owner"":""panjf2000"",""Repo"":""ants""}",_raw_github_api_pull_requ
[...]
1,219936521,134018330,15,closed,Fixes to benchmarks and added semaphore
comparison,2018-10-03T07:16:16.000+00:00,2018-10-03T12:38:57.000+00:00,2018-10-03T12:33:59.000+00:00,0,0,0,0,0,0,2018-10-03T12:33:59.000+00:00,"""Benchmark
results with Param=0, as time.Sleep is not stable on Windows\r\n\r\nAlso Go
1.11 has bunch of improvements:\r\n\r\n```\r\ngoos: windows\r\ngoarch:
amd64\r\npkg: github.com/panjf2000/ants\r\nBenchmarkGoroutineWithFunc-8
1 3530220300 ns/op [...]
1,222703171,134018330,16,closed,bugfix(check max pool
size),2018-10-14T09:21:41.000+00:00,2018-12-03T03:53:31.000+00:00,2018-12-03T03:53:31.000+00:00,0,0,0,0,0,0,,"""if
you limit max goroutine to math.Maxint32 as your code `int32(pool size)`\r\nI
think should check max Goroutine size, otherwise size overflow to
negative?\r\n""",,,1399cfa28f6751f769a985206daecb56a08b2de9,bugfix_check_max_pool_size,master,711dbdb7a222771ce15aaee1bb7b7c6e9731f208,439348b027031c793e54669fcd74eb4964c15055,ht
[...]
diff --git a/plugins/github/e2e/snapshot_tables/issue_comments.csv
b/plugins/github/e2e/snapshot_tables/issue_comments.csv
index 5fa3cd2d..80530d37 100644
--- a/plugins/github/e2e/snapshot_tables/issue_comments.csv
+++ b/plugins/github/e2e/snapshot_tables/issue_comments.csv
@@ -3,10 +3,10 @@
github:GithubIssue:1:409800144,github:GithubIssue:1:346842831,"""这里freeSigna
github:GithubIssue:1:410141732,github:GithubIssue:1:347255859,"""切片如下\r\n\r\n这里等待锁\r\n9913
@ 0x42c73a 0x42c7ee 0x43cf64 0x43cc7d 0x46dfe8 0x7b28e0 0x7b2be5
0x4591f1\r\n#\t0x43cc7c\tsync.runtime_SemacquireMutex+0x3c\t\t\t\tE:/go/src/runtime/sema.go:71\r\n#\t0x46dfe7\tsync.(*Mutex).Lock+0x107\t\t\t\t\tE:/go/src/sync/mutex.go:134\r\n#\t0x7b28df\tmp/vendor/github.com/panjf2000/ants.(*Pool).putWorker+0x6f\tF:/gowork/src/mp/vendor/github.com/panjf2000/ants/pool.go:229\r\n#\t0x7b2be4\tmp/vendor
[...]
github:GithubIssue:1:410143221,github:GithubIssue:1:347255859,"""加了锁之后有下标溢出了。。。\r\npanic:
runtime error: index out of range\r\n\r\ngoroutine 7
[running]:\r\nmp/vendor/github.com/panjf2000/ants.(*Pool).getWorker(0xc4200b6460,
0xc4202a6e01)\r\n\tF:/gowork/src/mp/vendor/github.com/panjf2000/ants/pool.go:213
+0x2ce\r\nmp/vendor/github.com/panjf2000/ants.(*Pool).Submit(0xc4200b6460,
0xc4223d47d0, 0x0,
0x0)\r\n\tF:/gowork/src/mp/vendor/github.com/panjf2000/ants/pool.go:125
+0x62\r\n""",github: [...]
github:GithubIssue:1:410147487,github:GithubIssue:1:347255859,"""@lovelly
我查了源码,怎么行数和你说的有点对不上,你的代码更新到最新了吗?""",github:GithubUser:1:7496278,2018-08-03T05:21:03.000+00:00
-github:GithubIssue:1:410170764,github:GithubIssue:1:347255859,"""是最新的代码,我有添加一些print
所以行数不一样,这确实是一个bug 9913个协程阻塞在了 putWorker
很久很久。,。。。""",github:GithubUser:1:13118848,2018-08-03T07:33:21.000+00:00
+github:GithubIssue:1:410170764,github:GithubIssue:1:347255859,"""😄 😄 😄
是最新的代码,我有添加一些print 所以行数不一样,这确实是一个bug 9913个协程阻塞在了 putWorker
很久很久。,。。。""",github:GithubUser:1:13118848,2018-08-03T07:33:21.000+00:00
github:GithubIssue:1:410173358,github:GithubIssue:1:347255859,"""\r\n
我idleWorkers 为空的, 但是我有n个协程阻塞在了 204行的\t<-p.freeSignal,
这时候来了一个worker被放入idleWorkers, 很巧的是一个协程在putWorker结束锁后,在190行的p.lock.Lock()拿到了锁,这时候
n := len(idleWorkers) - 1 结果是0 这个协程很高兴的进入了接下来的else分支,
然而不幸发生了,p.freeSignal的信号确被早已等在 204行的若干个协程中的一个拿走了, 那么 可怜的协程拿到了锁, 确无法等到
p.freeSignal p.freeSignal要拿到锁才能产生信号, 然后就。,。。""",github [...]
github:GithubIssue:1:410204870,github:GithubIssue:1:347255859,"""@lovelly
检查了一下,的确可能会有这个问题,这两天我会修复;\r\n另外,我测试的时候试过1000w的量都没发现过这个问题,可能是我每个任务的执行时间太短了,所以我想问下你的任务量有多大以及每个任务的耗时大概是多少?""",github:GithubUser:1:7496278,2018-08-03T09:51:15.000+00:00
-github:GithubIssue:1:410205295,github:GithubIssue:1:347255859,"""我任务耗时从0秒到60秒之间。。。""",github:GithubUser:1:13118848,2018-08-03T09:53:00.000+00:00
+github:GithubIssue:1:410205295,github:GithubIssue:1:347255859,"""😄 😄 😄
我任务耗时从0秒到60秒之间。。。""",github:GithubUser:1:13118848,2018-08-03T09:53:00.000+00:00
github:GithubIssue:1:410267195,github:GithubIssue:1:347255859,"""@lovelly
应该已经修复了,可以再试试""",github:GithubUser:1:7496278,2018-08-03T14:15:45.000+00:00
github:GithubIssue:1:410290418,github:GithubIssue:1:346842831,"""具体问题可以看 #6
""",github:GithubUser:1:7496278,2018-08-03T15:32:00.000+00:00
github:GithubIssue:1:411342200,github:GithubIssue:1:348630179,"""@huiwq1990
谢谢指出,今天会修复这个问题。""",github:GithubUser:1:7496278,2018-08-08T09:17:30.000+00:00
@@ -31,10 +31,10 @@
github:GithubIssue:1:439792581,github:GithubIssue:1:382039050,"""GOMAXPROCS你
github:GithubIssue:1:439793939,github:GithubIssue:1:381941219,"""release的确有这个问题,目前还没有比较好的办法,只是等待定时销毁的那个goroutine去释放内存,你要是有兴趣可以再想想有没有更好的办法,可以提个pr""",github:GithubUser:1:7496278,2018-11-19T07:18:05.000+00:00
github:GithubIssue:1:440207809,github:GithubIssue:1:382574800,"""https://github.com/panjf2000/ants/blob/711dbdb7a222771ce15aaee1bb7b7c6e9731f208/pool.go#L119""",github:GithubUser:1:5668717,2018-11-20T09:41:24.000+00:00
github:GithubIssue:1:440263871,github:GithubIssue:1:382574800,"""这里可以讨论下,是否可以在任务函数里通过闭包的形式,将结果存入channel,满足你的需求?""",github:GithubUser:1:7496278,2018-11-20T12:56:13.000+00:00
-github:GithubIssue:1:440500490,github:GithubIssue:1:382574800,""">
这里可以讨论下,是否可以在任务函数里通过闭包的形式,将结果存入channel,满足你的需求?\r\n\r\n可以的。但不仅仅如此,最重要的是想得到哪条消息失败了,方便进行下次延时处理或丢回队列。""",github:GithubUser:1:5668717,2018-11-21T02:00:22.000+00:00
+github:GithubIssue:1:440500490,github:GithubIssue:1:382574800,""">
这里可以讨论下,是否可以在任务函数里通过闭包的形式,将结果存入channel,满足你的需求?\r\n\r\n可以的。但不仅仅如此,最重要的是想得到哪条消息失败了,方便进行❓下次延时处理或丢回队列。""",github:GithubUser:1:5668717,2018-11-21T02:00:22.000+00:00
github:GithubIssue:1:440541883,github:GithubIssue:1:382574800,"""目前可以通过参数来传入处理失败的chan\r\n\r\ntype
msg struct {\r\n……\r\nFailed chan<- *msg\r\n}\r\n\r\n// payload ==
&msg\r\npool,_:= NewPoolWithFunc(10,func(payload interface{})
error{\r\n……\r\n// 失败的话payload 发送到 Failed
chan\r\n})\r\n\r\npool.Serve(msg)""",github:GithubUser:1:7931755,2018-11-21T05:57:51.000+00:00
github:GithubIssue:1:440605531,github:GithubIssue:1:382574800,""">
目前可以通过参数来传入处理失败的chan\r\n> \r\n> type msg struct {\r\n> ……\r\n> Failed chan<-
*msg\r\n> }\r\n> \r\n> // payload == &msg\r\n> pool,_:=
NewPoolWithFunc(10,func(payload interface{}) error{\r\n> ……\r\n> // 失败的话payload
发送到 Failed chan\r\n> })\r\n> \r\n> pool.Serve(msg)\r\n\r\n我目前的做法是没有用
`NewPoolWithFunc()`,而是用的
`ants.NewPool()`,控制整个服务只有一个`pool`,所有的任务都是从大`pool`里取:\r\n\r\n```\r\nfunc (w
*Worker) Register(fn func() error, opts ... [...]
-github:GithubIssue:1:440876192,github:GithubIssue:1:382574800,"""错误返回,按照ants的设计,其实应该是异步的,目前没办法直接return
error到调用的函数里,所以我觉得就算是处理也应该是异步的方式;至于任务依赖,目前想到的有两种办法:1.回调函数;2.消息通知(通过channel或消息队列),至于是不是要把这些复杂的逻辑加到ants里,有待商榷,或者你也可以推一个pr,大家一起探讨下~~""",github:GithubUser:1:7496278,2018-11-22T01:09:56.000+00:00
+github:GithubIssue:1:440876192,github:GithubIssue:1:382574800,"""错误返回,按照ants的设计,其实应该是异步的,目前没办法直接return
error到调用的函数里,所以我觉得就算是处理也应该是异步的方式;至于任务依赖,❓目前想到的有两种办法:1.回调函数;2.消息通知(通过channel或消息队列),至于是不是要把这些复杂的逻辑加到ants里,有待商榷,或者你也可以推一个pr,大家一起探讨下~~""",github:GithubUser:1:7496278,2018-11-22T01:09:56.000+00:00
github:GithubIssue:1:442366878,github:GithubIssue:1:381941219,"""在 pool里面加上一个
waitgroup,每次 启动一个 work,调用
waitgroup.Add(),协程执行完了就执行waitgroup.Done()。在release时候调用waitgroup.Wait()。最后再回收空闲
worker。不过b如果 worker 对于的 func
执行时间过长,会导致release一直等待。""",github:GithubUser:1:32898629,2018-11-28T08:48:17.000+00:00
github:GithubIssue:1:445462719,github:GithubIssue:1:388907811,"""你的go版本是多少?""",github:GithubUser:1:7496278,2018-12-08T14:20:26.000+00:00
github:GithubIssue:1:445496131,github:GithubIssue:1:388907811,"""go version
go1.11.1 darwin/amd64\r\n\r\n我也尝试了将几个参数调小一点,结果都是 Semaphore 和 AntsPool
量级上都是差不多的""",github:GithubUser:1:720086,2018-12-08T22:56:54.000+00:00
diff --git a/plugins/github/e2e/snapshot_tables/pull_requests.csv
b/plugins/github/e2e/snapshot_tables/pull_requests.csv
index ddb8e373..57814feb 100644
--- a/plugins/github/e2e/snapshot_tables/pull_requests.csv
+++ b/plugins/github/e2e/snapshot_tables/pull_requests.csv
@@ -3,7 +3,7 @@
github:GithubPullRequest:1:203756736,github:GithubRepo:1:134018330,,closed,pre-a
github:GithubPullRequest:1:211603583,github:GithubRepo:1:134018330,,closed,fix
goroutine leak,"""n++, will cause workers[0]
leak""",https://github.com/panjf2000/ants/pull/8,hongli-my,github:GithubUser:1:8597823,,8,2018-08-29T01:35:54.000+00:00,,2018-10-30T00:12:13.000+00:00,,,74ba726f34abe487b7defac6bb9bebf24d342377,dev,master,666635c65d8d3bb1223b819325e0bd23c81f2733,afd687164b13280199208ec4869709edcf02b52d
github:GithubPullRequest:1:212277907,github:GithubRepo:1:134018330,,closed,Update
pool.go,"""#活着的孩子不想当孤儿\r\n\tHopefully:\r\n\tchildren :=
[]*child{C1,C2,C3,C4,C5,C6,C7}\r\n\tIn fact:\r\n\tchildren :=
[]*child{C1,C4,C2,C3,C5,C6,C7}""",https://github.com/panjf2000/ants/pull/9,Nonnnnnnnnn,github:GithubUser:1:42808204,,9,2018-08-31T05:29:36.000+00:00,,2018-08-31T13:40:33.000+00:00,,,f14d3f91f68d0bc23fe42aa413e98005f6575045,patch-1,master,666635c65d8d3bb1223b819325e0bd23c81f2733,2726d42ea6285
[...]
github:GithubPullRequest:1:216254598,github:GithubRepo:1:134018330,,closed,graceful
exit,"""graceful
exit""",https://github.com/panjf2000/ants/pull/11,shanhuhai5739,github:GithubUser:1:3794113,,11,2018-09-18T10:15:01.000+00:00,,2018-12-03T03:52:35.000+00:00,,,6a87067eb3d6440e5db17f31d4bc12ac291633f4,master,develop,833b6e29acfb2f16e3cf7fc92c79763847c319f4,a03eccc794870f0a2e55a5cb8344ea47f2a0001d
-github:GithubPullRequest:1:218939809,github:GithubRepo:1:134018330,,closed,解决死循环导致cpu占用率过高,"""使用了cond
条件变量来阻塞Submit
goroutine。潘少,你再仔细琢磨琢磨,看下有何不妥?""",https://github.com/panjf2000/ants/pull/13,liyonglion,github:GithubUser:1:12890888,,13,2018-09-28T11:37:28.000+00:00,2018-09-29T11:29:54.000+00:00,2018-09-29T11:29:54.000+00:00,,,9a3b5cd25344822bca7684f87d9e123890a7bf59,master,master,af376f1b7b59dc488458bcecd4273f0fcde33c55,1846b4392a3a20e6bf1a7431b67f86bd43e0f0b9
+github:GithubPullRequest:1:218939809,github:GithubRepo:1:134018330,,closed,❓解决死循环导致cpu占用率过高,"""使用了cond
条件变量来阻塞Submit
goroutine。潘少,你再仔细琢磨琢磨,看下有何不妥?""",https://github.com/panjf2000/ants/pull/13,liyonglion,github:GithubUser:1:12890888,,13,2018-09-28T11:37:28.000+00:00,2018-09-29T11:29:54.000+00:00,2018-09-29T11:29:54.000+00:00,,,9a3b5cd25344822bca7684f87d9e123890a7bf59,master,master,af376f1b7b59dc488458bcecd4273f0fcde33c55,1846b4392a3a20e6bf1a7431b67f86bd43e0f0b9
github:GithubPullRequest:1:219363161,github:GithubRepo:1:134018330,,closed,Remove
meaningless if
statements,"""""",https://github.com/panjf2000/ants/pull/14,SimePel,github:GithubUser:1:20608155,,14,2018-10-01T12:48:11.000+00:00,2018-10-02T13:52:27.000+00:00,2018-10-02T13:52:27.000+00:00,,,29730bb70343924a2f56a13a9799611dd1cd27fd,master,master,1b62696050b7030106291980d5220f886b017eff,5ed168767a771e3802252020b9821610380ed1a4
github:GithubPullRequest:1:219936521,github:GithubRepo:1:134018330,,closed,Fixes
to benchmarks and added semaphore comparison,"""Benchmark results with
Param=0, as time.Sleep is not stable on Windows\r\n\r\nAlso Go 1.11 has bunch
of improvements:\r\n\r\n```\r\ngoos: windows\r\ngoarch: amd64\r\npkg:
github.com/panjf2000/ants\r\nBenchmarkGoroutineWithFunc-8 1
3530220300 ns/op 207472 B/op 506
allocs/op\r\nBenchmarkSemaphoreWithFunc-8 1 43919 [...]
github:GithubPullRequest:1:222703171,github:GithubRepo:1:134018330,,closed,bugfix(check
max pool size),"""if you limit max goroutine to math.Maxint32 as your code
`int32(pool size)`\r\nI think should check max Goroutine size, otherwise size
overflow to
negative?\r\n""",https://github.com/panjf2000/ants/pull/16,rikewang,github:GithubUser:1:24841832,,16,2018-10-14T09:21:41.000+00:00,,2018-12-03T03:53:31.000+00:00,,,1399cfa28f6751f769a985206daecb56a08b2de9,bugfix_check_max_pool_size,master
[...]
diff --git a/plugins/github/tasks/comment_collector.go
b/plugins/github/tasks/comment_collector.go
index 2f6b49d0..9f69c29f 100644
--- a/plugins/github/tasks/comment_collector.go
+++ b/plugins/github/tasks/comment_collector.go
@@ -86,8 +86,9 @@ func CollectApiComments(taskCtx core.SubTaskContext) error {
RawDataSubTaskArgs: helper.RawDataSubTaskArgs{
Ctx: taskCtx,
Params: GithubApiParams{
- Owner: data.Options.Owner,
- Repo: data.Options.Repo,
+ ConnectionId: data.Options.ConnectionId,
+ Owner: data.Options.Owner,
+ Repo: data.Options.Repo,
},
Table: RAW_COMMENTS_TABLE,
},