diff options
author | Marko Kreen | 2012-10-09 19:43:10 +0000 |
---|---|---|
committer | Marko Kreen | 2012-10-09 19:43:10 +0000 |
commit | 01a731c376fe0b2594c66ca94dab3d13a9602fb7 (patch) | |
tree | 5dfe65fadf3ea6b37501d6aa5c8fbbf58be901c0 | |
parent | 95acbc855c9b77e34fa7e2ea33da3e6d686824a9 (diff) |
copy-cond: only dst handler condition is useful
-rw-r--r-- | python/londiste/compare.py | 2 | ||||
-rw-r--r-- | python/londiste/repair.py | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/python/londiste/compare.py b/python/londiste/compare.py index 1412336c..f2d253ab 100644 --- a/python/londiste/compare.py +++ b/python/londiste/compare.py @@ -24,8 +24,8 @@ class Comparator(Syncer): src_curs = src_db.cursor() dst_curs = dst_db.cursor() - src_where = t1.plugin.get_copy_condition(src_curs, dst_curs) dst_where = t2.plugin.get_copy_condition(src_curs, dst_curs) + src_where = dst_where self.log.info('Counting %s' % dst_tbl) diff --git a/python/londiste/repair.py b/python/londiste/repair.py index 5a04d7a0..d33e6d62 100644 --- a/python/londiste/repair.py +++ b/python/londiste/repair.py @@ -59,12 +59,13 @@ class Repairer(Syncer): dump_src = dst_tbl + ".src" dump_dst = dst_tbl + ".dst" + dst_where = t2.plugin.get_copy_condition(src_curs, dst_curs) + src_where = dst_where + self.log.info("Dumping src table: %s" % src_tbl) - src_where = t1.plugin.get_copy_condition(src_curs, dst_curs) self.dump_table(src_tbl, src_curs, dump_src, src_where) src_db.commit() self.log.info("Dumping dst table: %s" % dst_tbl) - dst_where = t2.plugin.get_copy_condition(src_curs, dst_curs) self.dump_table(dst_tbl, dst_curs, dump_dst, dst_where) dst_db.commit() |