Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index out of range in BitGet #130

Open
k-krst opened this issue Nov 17, 2020 · 2 comments
Open

Index out of range in BitGet #130

k-krst opened this issue Nov 17, 2020 · 2 comments

Comments

@k-krst
Copy link

k-krst commented Nov 17, 2020

Hallo.
I need help.

I use pg-chameleon 2.0.16. Init process is normal.
After command start_replica process crash and there is the follow text in log file:

2020-11-17 16:51:51 MainProcess DEBUG: Changing the autocommit flag to True
2020-11-17 16:51:51 MainProcess DEBUG: Changing the autocommit flag to True
2020-11-17 16:51:51 MainProcess DEBUG: Changing the autocommit flag to True
2020-11-17 16:51:51 MainProcess INFO: Checking if the replica for source mysql3 is stopped
2020-11-17 16:51:51 MainProcess INFO: Cleaning not processed batches for source mysql3
2020-11-17 16:51:51 MainProcess DEBUG: Cleaning table t_log_replica_mysql3_2
2020-11-17 16:51:51 MainProcess DEBUG: Cleaning table t_log_replica_mysql3_1
2020-11-17 16:51:51 MainProcess INFO: Starting the replica daemons for source mysql3
2020-11-17 16:51:51 MainProcess DEBUG: Replica process for source mysql3 is running
2020-11-17 16:51:51 MainProcess DEBUG: Changing the autocommit flag to True
2020-11-17 16:51:51 MainProcess DEBUG: Cleaning replayed batches for source mysql3 older than 1 day
2020-11-17 16:52:01 MainProcess ERROR: Read process alive: False - Replay process alive: True
2020-11-17 16:52:01 MainProcess ERROR: Stack trace: Traceback (most recent call last):
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pg_chameleon/lib/global_lib.py", line 496, in read_replica
self.mysql_source.read_replica()
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pg_chameleon/lib/mysql_lib.py", line 1453, in read_replica
replica_data=self.__read_replica_stream(batch_data)
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pg_chameleon/lib/mysql_lib.py", line 1311, in __read_replica_stream
for row in binlogevent.rows:
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 433, in rows
self._fetch_rows()
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 428, in _fetch_rows
self.__rows.append(self._fetch_one_row())
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 481, in _fetch_one_row
row["values"] = self._read_column_data(self.columns_present_bitmap)
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pymysqlreplication/row_event.py", line 97, in _read_column_data
if BitGet(cols_bitmap, i) == 0:
File "/home/user/chameleon2/env/lib/python3.7/site-packages/pymysqlreplication/bitmap.py", line 34, in BitGet
bit = bitmap[int(position / 8)]
IndexError: index out of range

2020-11-17 16:52:01 MainProcess ERROR: Read daemon crashed. Terminating the replay daemon.
2020-11-17 16:52:01 MainProcess DEBUG: Changing the autocommit flag to True
2020-11-17 16:52:01 MainProcess INFO: Replica process for source mysql3 ended

My databases are:
MySQL 8.0.20-11
PostgreSQL 12.4 (Debian 12.4-1.pgdg90+1)

@the4thdoctor
Copy link
Owner

Hi, this seems to be an issue with the replication library.
There is already an open ticket for the problem here.
julien-duponchelle/python-mysql-replication#330

@k-krst
Copy link
Author

k-krst commented Nov 18, 2020

Thanks a lot. I think so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants