clebertsuconic commented on a change in pull request #3223:
URL: https://github.com/apache/activemq-artemis/pull/3223#discussion_r456492114
##########
File path:
artemis-journal/src/main/java/org/apache/activemq/artemis/core/io/AbstractSequentialFile.java
##########
@@ -271,7 +271,7 @@ protected ByteBuffer newBuffer(int size, int limit) {
public void flushBuffer(final ByteBuf byteBuf, final boolean
requestedSync, final List<IOCallback> callbacks) {
final int bytes = byteBuf.readableBytes();
if (bytes > 0) {
- final ByteBuffer buffer = newBuffer(byteBuf.capacity(), bytes);
+ final ByteBuffer buffer = newBuffer(byteBuf.capacity(), bytes,
false);
Review comment:
In case we pool a buffer, and say you wrote 300 bytes, on a place that
previously had 4K filled
you will fill it with 300 bytes... the buffer will be flipped, but when the
libaio write takes place.. I'm afraid this could not cleanup the rest of the 4K.
I did not run any tests on this.. just from what I remember on the pool
mechanism.
just make sure the previously pooled buffer wouldn't make to the journal.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]