sijie commented on a change in pull request #798: Removed all per-entry
allocations in Journal operations
URL: https://github.com/apache/bookkeeper/pull/798#discussion_r154235398
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/Journal.java
##########
@@ -335,11 +351,11 @@ public int process(boolean shouldForceWrite) throws
IOException {
lastLogMark.setCurLogMark(this.logId,
this.lastFlushedPosition);
// Notify the waiters that the force write succeeded
- for (QueueEntry e : this.forceWriteWaiters) {
- cbThreadPool.execute(e);
+ for (int i = 0; i < forceWriteWaiters.size(); i++) {
+ cbThreadPool.execute((QueueEntry)
forceWriteWaiters.get(i));
Review comment:
it is not very good for type cast. but I think this question is related to
the comment above - can we avoid using netty internal class. if we did avoid,
can we make it type safe.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services