CheneyYin commented on PR #6288:
URL: https://github.com/apache/seatunnel/pull/6288#issuecomment-1977926184
```java
// debezium 1.6.4.Final
private ChangeEventQueue(Duration pollInterval, int maxQueueSize, int
maxBatchSize, Supplier<LoggingContext.PreviousContext> loggingContextSupplier,
long maxQueueSizeInBytes, boolean buffering) {
this.pollInterval = pollInterval;
this.maxBatchSize = maxBatchSize;
this.maxQueueSize = maxQueueSize;
this.queue = new LinkedBlockingDeque<>(maxQueueSize);
this.metronome = Metronome.sleeper(pollInterval, Clock.SYSTEM);
this.loggingContextSupplier = loggingContextSupplier;
this.maxQueueSizeInBytes = maxQueueSizeInBytes;
this.buffering = buffering;
}
```
https://github.com/debezium/debezium/blob/c6c40201d2a3cf70832525d77f87fc3270af145f/debezium-core/src/main/java/io/debezium/connector/base/ChangeEventQueue.java#L87-L98
```java
// debezium 1.9.8.Final
private ChangeEventQueue(Duration pollInterval, int maxQueueSize, int
maxBatchSize, Supplier<LoggingContext.PreviousContext> loggingContextSupplier,
long maxQueueSizeInBytes, boolean buffering) {
this.pollInterval = pollInterval;
this.maxBatchSize = maxBatchSize;
this.maxQueueSize = maxQueueSize;
this.queue = new ArrayDeque<>(maxQueueSize);
this.loggingContextSupplier = loggingContextSupplier;
this.sizeInBytesQueue = new ArrayDeque<>(maxQueueSize);
this.maxQueueSizeInBytes = maxQueueSizeInBytes;
this.buffering = buffering;
}
```
https://github.com/debezium/debezium/blob/393291bba54edc745f45a679ffd7b2aa7110f454/debezium-core/src/main/java/io/debezium/connector/base/ChangeEventQueue.java#L84-L94
Some JdbcSourceFetchTaskContext class (like MySqlSourceFetchTaskContext) set
size of ChangeEventQueue on `Integer.MAX_VALUE`. It will lead OOM because
`ArrayQueue` preallocated memory after upgrade debezium to 1.9.8.Final.
https://github.com/apache/seatunnel/blob/7b48a1674f0b2d6e978fb7c9ad30cbb2cc99cf87/seatunnel-connectors-v2/connector-cdc/connector-cdc-mysql/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/mysql/source/reader/fetch/MySqlSourceFetchTaskContext.java#L125-L145
--
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]