本文整理汇总了Python中lib.tarantool_server.TarantoolServer.get_lsn方法的典型用法代码示例。如果您正苦于以下问题:Python TarantoolServer.get_lsn方法的具体用法?Python TarantoolServer.get_lsn怎么用?Python TarantoolServer.get_lsn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类lib.tarantool_server.TarantoolServer
的用法示例。
在下文中一共展示了TarantoolServer.get_lsn方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1:
# 需要导入模块: from lib.tarantool_server import TarantoolServer [as 别名]
# 或者: from lib.tarantool_server.TarantoolServer import get_lsn [as 别名]
failed.deploy()
except Exception as e:
line = "ER_READONLY"
if failed.logfile_pos.seek_once(line) >= 0:
print "'%s' exists in server log" % line
print '-------------------------------------------------------------'
print 'Sync master with replica'
print '-------------------------------------------------------------'
# Sync master with replica
replication_source = yaml.load(replica.admin('box.cfg.listen', silent = True))[0]
sys.stdout.push_filter(replication_source, '<replication_source>')
master.admin("box.cfg{ replication_source = '%s' }" % replication_source)
master.wait_lsn(replica_id, replica.get_lsn(replica_id))
master.admin('box.info.vclock[%d] == 1' % replica_id)
master.admin('box.info.vclock[%d] == 0' % replica_id2)
master.admin('box.info.vclock[%d] == nil' % replica_id3)
master.admin("box.cfg{ replication_source = '' }")
replica.stop()
replica.cleanup(True)
print '-------------------------------------------------------------'
print 'Start a new replica and check that server_id, LSN is re-used'
print '-------------------------------------------------------------'
#
# gh-1219: Proper removal of servers with non-zero LSN from _cluster
#