From 9a335087d42c6236f91dc0a8fd79dc5e4e6f57ad 2016-07-07 20:41:01 From: Marcin Lulek Date: 2016-07-07 20:41:01 Subject: [PATCH] delete-by-query: test the non-routing version of the code, turns out one of the slaves didn't have the plugin installed that was the real issue probably --- diff --git a/backend/src/appenlight/models/report_group.py b/backend/src/appenlight/models/report_group.py index 0d46b4d..5de223b 100644 --- a/backend/src/appenlight/models/report_group.py +++ b/backend/src/appenlight/models/report_group.py @@ -254,8 +254,10 @@ def after_update(mapper, connection, target): def after_delete(mapper, connection, target): query = {'term': {'group_id': target.id}} - Datastores.es.delete_by_query(target.partition_id, 'report', query, - query_params={'routing':str(target.id)}) + # TODO: routing seems unnecessary, need to test a bit more + #Datastores.es.delete_by_query(target.partition_id, 'report', query, + # query_params={'routing':str(target.id)}) + Datastores.es.delete_by_query(target.partition_id, 'report', query) query = {'term': {'pg_id': target.id}} Datastores.es.delete_by_query(target.partition_id, 'report_group', query)