-
Notifications
You must be signed in to change notification settings - Fork 5
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
Issue 61 Fix with old style "Access" instead of "Rental" #84
Conversation
…se> and Supplier<Lease>.
…re than 1 instead of zero as Phaser inits at 1, not 0.
…rk BufferLeaseImpl.refs as unreliable, change Rental.closed() to return phaser.isTerminated
Note: RentalTest contains IllegalStateException assert that does not seem to happen, commented out for now.
… with the pre-existing buffer and id.
…rnalOffer, add stub unless phaser was terminated explicitly
…Lease to BufferContainer. Pool holds BufferContainers and wraps them in BufferLeases while out of the queue.
… to fix dirty buffer in pool.
# Conflicts: # src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeaseImpl.java # src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeasePool.java
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeaseImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeaseImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeaseImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeasePool.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeasePool.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/frame/access/Access.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/frame/access/Access.java
Outdated
Show resolved
Hide resolved
General note: Noticed mixed use of |
src/main/java/com/teragrep/rlp_03/context/buffer/BufferContainerImpl.java
Outdated
Show resolved
Hide resolved
BufferLease queuedBufferLease = queue.poll(); | ||
if (queuedBufferLease == null) { | ||
BufferContainer queuedBufferContainer = queue.poll(); | ||
if (queuedBufferContainer == null) { | ||
break; | ||
} | ||
} |
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.
Will this implementation consume all available processing power in a busy loop until poll returns null?
…ion, rename access.terminated() to isTerminated(), fix BufferContainerImpl logger class, remove attemptRelease() from BufferLease interface, remove usage of 'this' keyword outside of constructors, inline phaser (de)register output in BufferLeaseImpl and throw IllegalStateException in case of dirty pool,
added fixes till "wrong classname" comment |
src/main/java/com/teragrep/rlp_03/context/frame/access/Lease.java
Outdated
Show resolved
Hide resolved
…e() if-else clause.
…tead of peek() and poll() until null
added fixes to rest of the comments. |
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.
move Access stuff to it's own pr and this will do
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLease.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeaseImpl.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/buffer/BufferLeasePool.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/frame/access/Access.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/frame/access/Access.java
Outdated
Show resolved
Hide resolved
src/main/java/com/teragrep/rlp_03/context/frame/access/Lease.java
Outdated
Show resolved
Hide resolved
@kortemik Reverted to main branch Access / Lease / AccessTest. This PR should now only contain the changed BufferLease, will move Access phaser to new pull request. |
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.
LGTM
Add new phaser implementation rather than using a custom count and lock solution to BufferLease and Access.