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>
Fri, 20 Sep 2013 12:25:58 +0000 (14:25 +0200)
python/londiste/handlers/dispatch.py

index 0b02edcd463530a760b805e5175760ef18e93c67..7590ee73952707b6eac9cb043f048111e16d0251 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.