Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Fix branch-leaf repair #58

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion python/londiste/syncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def lock_table_branch(self, lock_db, setup_db, dst_db, src_tbl, dst_tbl):
q = "select * from pgq_node.get_node_info(%s)"
res = self.exec_cmd(dst_db, q, [self.queue_name])
last_tick = res[0]['worker_last_tick']
if last_tick > tick_id:
if last_tick >= tick_id:
break

# limit lock time
Expand Down
3 changes: 2 additions & 1 deletion tests/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ export PYTHONPATH PATH LD_LIBRARY_PATH PATH
PGHOST=localhost
export PGHOST


# to make tests independent from user environment
PSQLRC=/dev/null
2 changes: 1 addition & 1 deletion tests/londiste/test-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ run londiste3 $v conf/londiste_db1.ini create-root node1 'dbname=db1'
run londiste3 $v conf/londiste_db2.ini create-branch node2 'dbname=db2' --provider='dbname=db1'
run londiste3 $v conf/londiste_db3.ini create-branch node3 'dbname=db3' --provider='dbname=db2'
run londiste3 $v conf/londiste_db4.ini create-branch node4 'dbname=db4' --provider='dbname=db3'
run londiste3 $v conf/londiste_db5.ini create-branch node5 'dbname=db5' --provider='dbname=db4'
run londiste3 $v conf/londiste_db5.ini create-leaf node5 'dbname=db5' --provider='dbname=db4'

msg "Run ticker"
run pgqd $v -d conf/pgqd.ini
Expand Down