{"action":"created","issue":{"url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1992","repository_url":"https://api.github.com/repos/rsyslog/rsyslog","labels_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1992/labels{/name}","comments_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1992/comments","events_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1992/events","html_url":"https://github.com/rsyslog/rsyslog/pull/1992","id":272407912,"number":1992,"title":"omprog: added tests for transactions with feedback","user":{"login":"jsiwrk","id":31032174,"avatar_url":"https://avatars0.githubusercontent.com/u/31032174?v=4","gravatar_id":"","url":"https://api.github.com/users/jsiwrk","html_url":"https://github.com/jsiwrk","followers_url":"https://api.github.com/users/jsiwrk/followers","following_url":"https://api.github.com/users/jsiwrk/following{/other_user}","gists_url":"https://api.github.com/users/jsiwrk/gists{/gist_id}","starred_url":"https://api.github.com/users/jsiwrk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsiwrk/subscriptions","organizations_url":"https://api.github.com/users/jsiwrk/orgs","repos_url":"https://api.github.com/users/jsiwrk/repos","events_url":"https://api.github.com/users/jsiwrk/events{/privacy}","received_events_url":"https://api.github.com/users/jsiwrk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/rsyslog/rsyslog/milestones/25","html_url":"https://github.com/rsyslog/rsyslog/milestone/25","labels_url":"https://api.github.com/repos/rsyslog/rsyslog/milestones/25/labels","id":2936551,"number":25,"title":"v8.34","description":"","creator":{"login":"rgerhards","id":1482123,"avatar_url":"https://avatars3.githubusercontent.com/u/1482123?v=4","gravatar_id":"","url":"https://api.github.com/users/rgerhards","html_url":"https://github.com/rgerhards","followers_url":"https://api.github.com/users/rgerhards/followers","following_url":"https://api.github.com/users/rgerhards/following{/other_user}","gists_url":"https://api.github.com/users/rgerhards/gists{/gist_id}","starred_url":"https://api.github.com/users/rgerhards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgerhards/subscriptions","organizations_url":"https://api.github.com/users/rgerhards/orgs","repos_url":"https://api.github.com/users/rgerhards/repos","events_url":"https://api.github.com/users/rgerhards/events{/privacy}","received_events_url":"https://api.github.com/users/rgerhards/received_events","type":"User","site_admin":false},"open_issues":106,"closed_issues":14,"state":"open","created_at":"2017-11-25T09:49:59Z","updated_at":"2018-03-17T16:50:36Z","due_on":"2018-03-30T07:00:00Z","closed_at":null},"comments":5,"created_at":"2017-11-09T01:19:49Z","updated_at":"2018-03-17T16:51:35Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/rsyslog/rsyslog/pulls/1992","html_url":"https://github.com/rsyslog/rsyslog/pull/1992","diff_url":"https://github.com/rsyslog/rsyslog/pull/1992.diff","patch_url":"https://github.com/rsyslog/rsyslog/pull/1992.patch"},"body":"I have added two automated tests for the feedback feature introduced in #1753. They are still incomplete; consider this as work in progress. I have submitted the PR now because I'm stuck at two issues related to some behavior of the rsyslog core that I don't fully understand.\r\n\r\nMy doubts are related to how the rsyslog core handles transactions. I have marked them with two \"TODO\" marks in the code.\r\n\r\n1) It seems that deferred messages (confirmed with RS_RET_DEFER_COMMIT) in a transaction are not retried if a later message in the transaction fails (with RS_RET_SUSPENDED). Please see the TODO in \"omprog-transactions-feedback.sh\". Is this the expected behavior?\r\n\r\n2) If a commit fails (endTransaction returns a RS_RET_SUSPENDED), the next transaction hangs at the second message. The debug logs show that the action is correctly resumed, and sent the first message (which the action confirms with DEFER_COMMIT), but then action is no longer called, despite the queue is not empty yet (?). To reproduce this problem, see the TODO in \"omprog-feedback-bin.sh\"\r\n\r\n@rgerhards, it would be great if you could take a careful look at the PR and help me with these two doubts. I have saved the rsyslog debug files for the two cases:\r\n* [rsyslog-debug (deferred messages in failed transaction not retried).log](https://github.com/rsyslog/rsyslog/files/1455955/rsyslog-debug.deferred.messages.in.failed.transaction.not.retried.log)\r\n* [rsyslog-debug (next transaction hangs after failed commit).log](https://github.com/rsyslog/rsyslog/files/1455957/rsyslog-debug.next.transaction.hangs.after.failed.commit.log)\r\n\r\nI have carefully reviewed the handling of return codes in omprog.c, and I'm quite sure there isn't any bug there. I would say these behaviors are specific to the rsyslog core, and hence common to all plugins. Regarding the second case, I have tried to find out what's causing the hang by inspecting the code in action.c, but I don't fully understand how the retries are managed when a commit fails (it seems there is special retry code for this case).\r\n"},"comment":{"url":"https://api.github.com/repos/rsyslog/rsyslog/issues/comments/373935048","html_url":"https://github.com/rsyslog/rsyslog/pull/1992#issuecomment-373935048","issue_url":"https://api.github.com/repos/rsyslog/rsyslog/issues/1992","id":373935048,"user":{"login":"rgerhards","id":1482123,"avatar_url":"https://avatars3.githubusercontent.com/u/1482123?v=4","gravatar_id":"","url":"https://api.github.com/users/rgerhards","html_url":"https://github.com/rgerhards","followers_url":"https://api.github.com/users/rgerhards/followers","following_url":"https://api.github.com/users/rgerhards/following{/other_user}","gists_url":"https://api.github.com/users/rgerhards/gists{/gist_id}","starred_url":"https://api.github.com/users/rgerhards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rgerhards/subscriptions","organizations_url":"https://api.github.com/users/rgerhards/orgs","repos_url":"https://api.github.com/users/rgerhards/repos","events_url":"https://api.github.com/users/rgerhards/events{/privacy}","received_events_url":"https://api.github.com/users/rgerhards/received_events","type":"User","site_admin":false},"created_at":"2018-03-17T16:51:35Z","updated_at":"2018-03-17T16:51:35Z","author_association":"OWNER","body":"solaris CI failure is unrelated - I'll babysit it (I finally need to find a cure for the racy test...)."}}
{"actor":{"display_login":"rgerhards"}}