Skip to content
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

Backport to support/1.12 of GEODE-8652 #5694

Merged
merged 1 commit into from
Oct 30, 2020

Conversation

Bill
Copy link
Contributor

@Bill Bill commented Oct 30, 2020

GEODE-8652 NioSslEngine.close() fix
08e9e96
PR: #5666
Ticket: https://issues.apache.org/jira/browse/GEODE-8652

  • Is there a JIRA ticket associated with this PR? Is it referenced in the commit message?

  • Has your PR been rebased against the latest commit within the target branch (typically develop)?

  • Is your initial contribution a single, squashed commit?
    I intend to rebase this cherry-picked commit onto support/1.12

  • Does gradlew build run cleanly?

  • Have you written or updated unit tests to verify your changes?

- NioSslEngine.close() proceeds even if readers (or writers) are
  operating on its ByteBuffers, allowing Connection.close() to close
  its socket and proceed.

- NioSslEngine.close() needed a lock only on the output buffer, so
  we split what was a single lock into two. Also instead of using
  synchronized we use a ReentrantLock so we can
  call tryLock() and time out if needed in NioSslEngine.close().

- Since readers/writers may hold locks on these input/output buffers
  when NioSslEngine.close() is called a reference count is maintained
  and the buffers are returned to the pool only when the last user
  is done.

- To manage the locking and reference counting a new AutoCloseable
  ByteBufferSharing interface is introduced with a trivial
  implementation: ByteBufferSharingNoOp and a real implementation:
  ByteBufferSharingImpl.

Co-authored-by: Bill Burcham <bill.burcham@gmail.com>
Co-authored-by: Darrel Schneider <dschneider@pivotal.io>
Co-authored-by: Ernie Burghardt <burghardte@vmware.com>
(cherry picked from commit 08e9e96)
@Bill
Copy link
Contributor Author

Bill commented Oct 30, 2020

That distributed test failure was https://issues.apache.org/jira/browse/GEODE-7821

re-running distributed tests now

@Bill Bill merged commit 06642ea into support/1.12 Oct 30, 2020
@Bill Bill deleted the backport-1-12-GEODE-8652-and-friends branch October 30, 2020 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant