londiste.handlers.dispatch: fixed "ignore events aiming at obsolete partitions" bug
authormartinko <gamato@users.sf.net>
Thu, 19 Sep 2013 15:30:18 +0000 (17:30 +0200)
committermartinko <gamato@users.sf.net>
Thu, 19 Sep 2013 15:30:18 +0000 (17:30 +0200)
python/londiste/handlers/dispatch.py

index f17d44a6f47193e2aed8f4c67c06d502bdf9466f..477fd119a13a4e9dc694f0c8c87f4fb371c79125 100644 (file)
@@ -913,6 +913,8 @@ class Dispatcher (ShardHandler):
             self.drop_obsolete_partitions (self.dest_table, self.conf.retention_period, self.conf.period)
             if self.conf.ignore_old_events and not skytools.exists_table(curs, dst):
                 self.ignored_tables.add(dst) # must have been just dropped
+                if dst in self.row_handler.table_map:
+                    del self.row_handler.table_map[dst]
 
     def drop_obsolete_partitions (self, parent_table, retention_period, partition_period):
         """ Drop obsolete partitions of partition-by-date parent table.