Skip to content
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.

Commit

Permalink
Increase randomness of server_id to avoid conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-pie committed May 9, 2024
1 parent 572e08a commit 117b796
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tap_mysql/sync_strategies/binlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit 117b796

Please sign in to comment.