[fix](ccr) handle large binlog (#30435)
This commit is contained in:
@ -457,10 +457,22 @@ public class BinlogManager {
|
||||
int length = dis.readInt();
|
||||
byte[] data = new byte[length];
|
||||
dis.readFully(data);
|
||||
TMemoryInputTransport transport = new TMemoryInputTransport(data);
|
||||
Boolean isLargeBinlog = length > 8 * 1024 * 1024;
|
||||
if (isLargeBinlog) {
|
||||
LOG.info("a large binlog length {}", length);
|
||||
}
|
||||
|
||||
TMemoryInputTransport transport = new TMemoryInputTransport();
|
||||
transport.getConfiguration().setMaxMessageSize(Config.max_binlog_messsage_size);
|
||||
transport.reset(data);
|
||||
|
||||
TBinaryProtocol protocol = new TBinaryProtocol(transport);
|
||||
TBinlog binlog = new TBinlog();
|
||||
binlog.read(protocol);
|
||||
|
||||
if (isLargeBinlog) {
|
||||
LOG.info("a large binlog length {} type {}", length, binlog.type);
|
||||
}
|
||||
return binlog;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user