{"action":"created","issue":{"url":"https://api.github.com/repos/pat/thinking-sphinx/issues/784","labels_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/784/labels{/name}","comments_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/784/comments","events_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/784/events","html_url":"https://github.com/pat/thinking-sphinx/issues/784","id":35210231,"number":784,"title":"Show warning when guard file exists","user":{"login":"JHeidinga","id":1702015,"avatar_url":"https://avatars.githubusercontent.com/u/1702015?v=3","gravatar_id":"","url":"https://api.github.com/users/JHeidinga","html_url":"https://github.com/JHeidinga","followers_url":"https://api.github.com/users/JHeidinga/followers","following_url":"https://api.github.com/users/JHeidinga/following{/other_user}","gists_url":"https://api.github.com/users/JHeidinga/gists{/gist_id}","starred_url":"https://api.github.com/users/JHeidinga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JHeidinga/subscriptions","organizations_url":"https://api.github.com/users/JHeidinga/orgs","repos_url":"https://api.github.com/users/JHeidinga/repos","events_url":"https://api.github.com/users/JHeidinga/events{/privacy}","received_events_url":"https://api.github.com/users/JHeidinga/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2014-06-07T15:01:19Z","updated_at":"2016-01-13T01:46:16Z","closed_at":"2014-07-27T16:45:14Z","body":"Pat, \r\n\r\nThanks a lot for your effortless coding and helping of others. I have had the pleasure of using your well written gem (an example of how it should be done) and reading through a lot of thinking-sphinx issues in which you helped out every time. Respect!\r\n\r\nNot as much of an issue, but more an idea...\r\nI've spend quite a few hours figuring out why one specific model was not delta indexing on our production environment, but was on our development environment. As it turns out, a simple guard file was set for this model in db/sphinx/production. Because of this file, the model is thrown out of the index at the very last moment indexing occurs in:\r\n\r\nthinking-sphinx/lib/thinking_sphinx/controller.rb:6\r\n    indices = indices.reject { |index| File.exists? guard_file(index) }\r\n\r\nWould it be an idea to log a warning when this happens? "},"comment":{"url":"https://api.github.com/repos/pat/thinking-sphinx/issues/comments/171126352","html_url":"https://github.com/pat/thinking-sphinx/issues/784#issuecomment-171126352","issue_url":"https://api.github.com/repos/pat/thinking-sphinx/issues/784","id":171126352,"user":{"login":"pat","id":4183,"avatar_url":"https://avatars.githubusercontent.com/u/4183?v=3","gravatar_id":"","url":"https://api.github.com/users/pat","html_url":"https://github.com/pat","followers_url":"https://api.github.com/users/pat/followers","following_url":"https://api.github.com/users/pat/following{/other_user}","gists_url":"https://api.github.com/users/pat/gists{/gist_id}","starred_url":"https://api.github.com/users/pat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pat/subscriptions","organizations_url":"https://api.github.com/users/pat/orgs","repos_url":"https://api.github.com/users/pat/repos","events_url":"https://api.github.com/users/pat/events{/privacy}","received_events_url":"https://api.github.com/users/pat/received_events","type":"User","site_admin":false},"created_at":"2016-01-13T01:46:16Z","updated_at":"2016-01-13T01:46:16Z","body":"The warnings are very likely caused by race conditions. I'd recommend suspending deltas while inserting/updating these rows.\r\n\r\n```ruby\r\nThinkingSphinx::Deltas.suspend :forum_post do\r\n  # all the inserts\r\nend\r\n# a single delta index call is invoked afterwards.\r\n```\r\n\r\nIf you're updating records, not just inserting, and you want the old record data to be ignored in the core index, use `suspend_and_update` instead of just `suspend`, and that'll mark all delta records as deleted in the core index as well as processing the delta index just once."}}