azexcy opened a new issue, #19818:
URL: https://github.com/apache/shardingsphere/issues/19818
Related code in MySQLClient:
```
/**
* Start dump binlog.
*
* @param binlogFileName binlog file name
* @param binlogPosition binlog position
*/
public synchronized void subscribe(final String binlogFileName, final
long binlogPosition) {
initDumpConnectSession();
registerSlave();
dumpBinlog(binlogFileName, binlogPosition, queryChecksumLength());
log.info("subscribe binlog file: {}, position: {}", binlogFileName,
binlogPosition);
reconnectTimes.set(0);
}
private void dumpBinlog(final String binlogFileName, final long
binlogPosition, final int checksumLength) {
responseCallback = null;
channel.pipeline().remove(MySQLCommandPacketDecoder.class);
channel.pipeline().remove(MySQLCommandResponseHandler.class);
channel.pipeline().addLast(new
MySQLBinlogEventPacketDecoder(checksumLength));
channel.pipeline().addLast(new MySQLBinlogEventHandler());
channel.writeAndFlush(new MySQLComBinlogDumpCommandPacket((int)
binlogPosition, connectInfo.getServerId(), binlogFileName));
}
```
The bulk inserts events :
<img width="1103" alt="image"
src="https://user-images.githubusercontent.com/101622833/182507902-144016ff-4b48-4a29-8b06-fcd133b5a87e.png">
Table_map at the begin of bulk inserts and appears only once, if the
position at the middle of it, ig. `21357029`, then will not receive Table_map
event, it will cause the problem when restart scaling job.
Related code in BinlogContext
```
@Getter
@Setter
public final class BinlogContext {
private String fileName;
private int checksumLength;
private Map<Long, MySQLBinlogTableMapEventPacket> tableMap = new
HashMap<>();
/**
* Cache table map event.
*
* @param tableId table id
* @param tableMapEventPacket table map event
*/
public void putTableMapEvent(final long tableId, final
MySQLBinlogTableMapEventPacket tableMapEventPacket) {
tableMap.put(tableId, tableMapEventPacket);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail:
[email protected]
For queries about this service, please contact Infrastructure at:
[email protected]