8000 Deadlock issues by davidtorres · Pull Request #1884 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@davidtorres
Copy link

davidtorres and others added 18 commits February 22, 2017 15:39
…on to (googleapis#1645)".

Compression is not fully supported in gRPC, can't have it in the library
yet.

This reverts commit a599972.
…Consumer interface, it really is

no useful to be able to set an exception as ack reply, since the result
is the same as nack, if we ever require another result then we can just
add one more value to the AckReply enum.

Also adding a fail-safe catch so if the receiver ever throws an
exception we will interpret that as a nack and keep going.
This prevents the library extending messages infinitevely if the user
code has lost track of the ack consumer handle.
user code
  - Separated the handling of batched received messages from the
    per-message dispatching of message to the user code. In order to
    accomplish this I had to keep the batch in memory while the processing
    of each message will draw from the in-memory batch until completely
    depleted.
    - Drawing flow controller permits on a per message basis (used to
      try to draw permits for the whole batch potentially deadlocking the
      whole subscriber), this addresses the deadlock condition raised here
      googleapis#1868
      - No longer using blocking flow controller, instead pausing and
        resuming pulls/streamed-messages based on the flow controller
        feedback and when new permits become available.
  - A separate executor for alarms (2 threads in it has showed up to
    scale pretty well with many subscriber, given our ack operations
    are pretty lightweight)
  - Setting the maximum of messages to pull per request based on the
    number requested by the user in the flow controller (if any), this
    in a best effort addresses
    googleapis#1868

Fixes googleapis#1868, fixes googleapis#1865 and fixes googleapis#1855
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 7, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.05%) to 81.037% when pulling b555c97 on davidtorres:deadlock-issues into 3e5ae85 on GoogleCloudPlatform:master.

@davidtorres
Copy link
Author

I'm dropping this PR and have it reviewed in my repo first by the team to then merge it here.

@davidtorres davidtorres closed this Apr 7, 2017
meltsufin pushed a commit that referenced this pull request Dec 22, 2025
* chore(main): release 3.23.8

* chore: generate libraries at Thu Nov 13 19:28:54 UTC 2025

---------

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: cloud-java-bot <cloud-java-bot@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0