-
Notifications
You must be signed in to change notification settings - Fork 182
fix: handle uncompressed transaction payloads beyond 2GB #172
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
base: master
Are you sure you want to change the base?
Conversation
...ithub/shyiko/mysql/binlog/event/deserialization/TransactionPayloadEventDataDeserializer.java
Outdated
Show resolved
Hide resolved
...ithub/shyiko/mysql/binlog/event/deserialization/TransactionPayloadEventDataDeserializer.java
Outdated
Show resolved
Hide resolved
...ithub/shyiko/mysql/binlog/event/deserialization/TransactionPayloadEventDataDeserializer.java
Outdated
Show resolved
Hide resolved
| internalEvent = transactionPayloadEventDeserializer.nextEvent(destinationInputStream); | ||
| } | ||
| try (ZstdInputStream zstdInputStream = new ZstdInputStream(new java.io.ByteArrayInputStream(eventData.getPayload()))) { | ||
| ByteArrayInputStream destinationInputStream = new ByteArrayInputStream(zstdInputStream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you talk more about the need to move to using input streams here? the old code looked much simpler, did it overflow the output buffer?
| } | ||
|
|
||
| public void setPayloadSize(int payloadSize) { | ||
| public void setPayloadSize(long payloadSize) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
payloadSize can stay an int too i think
| // Read the size of the field (use readPackedLong to support large field sizes) | ||
| if (inputStream.available() >= 1) { | ||
| fieldLen = inputStream.readPackedInteger(); | ||
| fieldLen = inputStream.readPackedInt(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
Fixes: #171
Before:

After:
