-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
PIP-74: Implemented memory limit in C++ producer #9676
Conversation
Did the
and
because the test image I see other tests detect Python2 but not Python3. |
@BewareMyPower Can you review it again? |
1 similar comment
@BewareMyPower Can you review it again? |
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
pulsar/pulsar-client-cpp/lib/ProducerImpl.cc Lines 249 to 270 in 430f1f3
@merlimat getPendingCallbacksWhenFailed is called when message timeouts. This function clears pendingMessagesQueue_ and batchMessageContainer_, so I think releaseSemaphore should be called here as well. |
### Motivation Similar to what already implemented in Java client, adding a client-wide memory limit for messages produced on all the C++ producers. ### Modifications Refactored the `pendingMessagesQueue` handling code to be similar to the Java implementation, using a "Deque" and a semaphore, rather that having all the logic collapsed into the queue implementation.
Motivation
Similar to what already implemented in Java client, adding a client-wide memory limit for messages produced on all the C++ producers.
Modifications
Refactored the
pendingMessagesQueue
handling code to be similar to the Java implementation, using a "Deque" and a semaphore, rather that having all the logic collapsed into the queue implementation.