in core/lib/payload/copy.py [0:0]
def start_snapshot(self):
# We need to disable TTL feature in MyRocks. Otherwise rows will
# possibly be purged during dump/load, and cause checksum mismatch
if self.is_myrocks_table and self.is_myrocks_ttl_table:
log.debug("It's schema change for MyRocks table which is using TTL")
self.disable_ttl_for_myrocks()
self.execute_sql(sql.start_transaction_with_snapshot)
current_max = self.get_max_delta_id()
log.info(
"Changes with id <= {} committed before dump snapshot, "
"and should be ignored.".format(current_max)
)
# Only replay changes in this range (last_replayed_id, max_id_now]
new_changes = self.query(
sql.get_replay_row_ids(
self.IDCOLNAME,
self.DMLCOLNAME,
self.delta_table_name,
None,
self.mysql_version.is_mysql8,
),
(
self.last_replayed_id,
current_max,
),
)
self._replayed_chg_ids.extend([r[self.IDCOLNAME] for r in new_changes])
self.last_replayed_id = current_max