From 117b7966a401ab4a6b99c48423106f3a7af74993 Mon Sep 17 00:00:00 2001 From: Louis Pieterse Date: Thu, 9 May 2024 10:27:53 +0100 Subject: [PATCH] Increase randomness of server_id to avoid conflicts --- tap_mysql/sync_strategies/binlog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap_mysql/sync_strategies/binlog.py b/tap_mysql/sync_strategies/binlog.py index f569ba3..bfe591e 100644 --- a/tap_mysql/sync_strategies/binlog.py +++ b/tap_mysql/sync_strategies/binlog.py @@ -809,7 +809,7 @@ def create_binlog_stream_reader( server_id = int(config.get('server_id')) LOGGER.info("Using provided server_id=%s", server_id) else: - server_id = random.randint(1, 2 ^ 32) # generate random server id for this slave + server_id = random.randint(1, 2 ** 32 - 1) # generate random server id for this slave LOGGER.info("Using randomly generated server_id=%s", server_id) engine = config['engine']