{"action":"created","issue":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/2889","repository_url":"https://api.github.com/repos/mperham/sidekiq","labels_url":"https://api.github.com/repos/mperham/sidekiq/issues/2889/labels{/name}","comments_url":"https://api.github.com/repos/mperham/sidekiq/issues/2889/comments","events_url":"https://api.github.com/repos/mperham/sidekiq/issues/2889/events","html_url":"https://github.com/mperham/sidekiq/issues/2889","id":141673079,"number":2889,"title":"Parent batches disappearing","user":{"login":"kreynolds","id":324744,"avatar_url":"https://avatars.githubusercontent.com/u/324744?v=3","gravatar_id":"","url":"https://api.github.com/users/kreynolds","html_url":"https://github.com/kreynolds","followers_url":"https://api.github.com/users/kreynolds/followers","following_url":"https://api.github.com/users/kreynolds/following{/other_user}","gists_url":"https://api.github.com/users/kreynolds/gists{/gist_id}","starred_url":"https://api.github.com/users/kreynolds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kreynolds/subscriptions","organizations_url":"https://api.github.com/users/kreynolds/orgs","repos_url":"https://api.github.com/users/kreynolds/repos","events_url":"https://api.github.com/users/kreynolds/events{/privacy}","received_events_url":"https://api.github.com/users/kreynolds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2016-03-17T18:43:10Z","updated_at":"2016-03-21T21:46:23Z","closed_at":null,"body":"I have a very complex workflow with many sub batches within a parent batch, and I intermittently see an issue where the parent batch disappears but the child batch is left. There are no expired keys in redis, I don't delete any batches in code anywhere. In the success callback, I delete a corresponding model in the SQL database and those models are being left behind, so the success callback is not being fired, the parent batch is just being deleted in redis. The only hint I could *maybe* give is that it seems to happen to batches that are left in existence for a while (a week or two) .. is there a chance that there is a bug in the retry or expiration code with batches that cause the parent batch to be deleted yet allow a child batch to live?\r\n\r\nGem versions:\r\n```\r\nsidekiq (4.1.0)\r\nsidekiq-ent (1.2.0)\r\nsidekiq-pro (3.0.5)\r\n```"},"comment":{"url":"https://api.github.com/repos/mperham/sidekiq/issues/comments/199500626","html_url":"https://github.com/mperham/sidekiq/issues/2889#issuecomment-199500626","issue_url":"https://api.github.com/repos/mperham/sidekiq/issues/2889","id":199500626,"user":{"login":"mperham","id":2911,"avatar_url":"https://avatars.githubusercontent.com/u/2911?v=3","gravatar_id":"","url":"https://api.github.com/users/mperham","html_url":"https://github.com/mperham","followers_url":"https://api.github.com/users/mperham/followers","following_url":"https://api.github.com/users/mperham/following{/other_user}","gists_url":"https://api.github.com/users/mperham/gists{/gist_id}","starred_url":"https://api.github.com/users/mperham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mperham/subscriptions","organizations_url":"https://api.github.com/users/mperham/orgs","repos_url":"https://api.github.com/users/mperham/repos","events_url":"https://api.github.com/users/mperham/events{/privacy}","received_events_url":"https://api.github.com/users/mperham/received_events","type":"User","site_admin":false},"created_at":"2016-03-21T21:46:23Z","updated_at":"2016-03-21T21:46:23Z","body":"Yeah I see what you are saying.  Let's say that you can't have an overarching parent batch for everything.  You could create \"next step\" batches that aren't related with a common Sidekiq::Batch parent but you can have batch A create batch B in A's success handler and pass the SidekiqBatch ID.  The ID could be passed along down the line so that the final batch in the workflow could clean up the DB but you wouldn't need a common parent batch over all.  The database model would effectively be the \"parent\" record that they all share."}}