You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "merlimat (via GitHub)" <gi...@apache.org> on 2024/06/05 18:09:32 UTC

[PR] [improve] Refactored BK ClientFactory to return futures [pulsar]

merlimat opened a new pull request, #22853:
URL: https://github.com/apache/pulsar/pull/22853

   ### Motivation
   
   BK client creation can be blocking when it's configured with rack-awareness policy. 
   This, combined with per-namespace BK client policies, can lead to deadlock situations as explained in #22840
   
   ### Modifications
   
    1. Changed the BK client factory to return a future for BK client creation
    2. Internally create the BK client in background 
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: <!-- ENTER URL HERE -->
   
   <!--
   After opening this PR, the build in apache/pulsar will fail and instructions will
   be provided for opening a PR in the PR author's forked repository.
   
   apache/pulsar pull requests should be first tested in your own fork since the 
   apache/pulsar CI based on GitHub Actions has constrained resources and quota.
   GitHub Actions provides separate quota for pull requests that are executed in 
   a forked repository.
   
   The tests will be run in the forked repository until all PR review comments have
   been handled, the tests pass and the PR is approved by a reviewer.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve] Refactored BK ClientFactory to return futures [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on PR #22853:
URL: https://github.com/apache/pulsar/pull/22853#issuecomment-2151172505

   I'm skipping backporting to `branch-3.0` because there are several conflicts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve] Refactored BK ClientFactory to return futures [pulsar]

Posted by "rdhabalia (via GitHub)" <gi...@apache.org>.
rdhabalia commented on PR #22853:
URL: https://github.com/apache/pulsar/pull/22853#issuecomment-2151047012

   > I honestly don't understand how can you be polemic about this. It baffles me.
   
   I said what I saw. I have closed all other PRs and we can merge this one.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve] Refactored BK ClientFactory to return futures [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on PR #22853:
URL: https://github.com/apache/pulsar/pull/22853#issuecomment-2151024973

   > was not good where we ignore actual solution without proper review and other one was merged even if that approach was incorrect.
   
   ?!? It was so much ignored that you had 2 people jumping on your issue report within 2 hours, discussing multiple ways on how to best solve the issue.
   
   > I am not sure how this can help fo fix strict affinity and deadlock issue.  
   
   I think I've explained in the description and subsequent comment. It's similar to your approach, though in a more general way, it addresses all the usages where we are constructing the BK client, instead of just in one single spot.
   
   > and other one was merged even if that approach was incorrect. 
   
   I think you have not read my multiple comments on why that PR was needed.
   
   >  and please advise if anyone has plan to create PR so, one avoid doing duplicate efforts.
   
   ?? You posted your PR at the same time at the issue. I didn't fully agree with your proposed solution, so it's why I'm proposing a similar, though more general, way to fix the issue. 
   
   I honestly don't understand how can you be polemic about this. It baffles me.
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve] Refactored BK ClientFactory to return futures [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat commented on PR #22853:
URL: https://github.com/apache/pulsar/pull/22853#issuecomment-2151004493

   @rdhabalia 
    
   > if there is no issue with https://github.com/apache/pulsar/pull/22842 then can we merge it?
   
   There are still issues wiht #22842: 
   
    1. It's only address 1 usage of a blocking API that is used in multiple places as if it were non-blocking
    2. Does not solve the problem that if there's a timeout, it falls back to use default BK client, which might break the assumptions
    
   PTAL at this PR, it's a similar change, though it brings it closer to the BK client creation, so that all the factories expose non-blocking API. I believe it's a more general solution than #22842


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve] Refactored BK ClientFactory to return futures [pulsar]

Posted by "rdhabalia (via GitHub)" <gi...@apache.org>.
rdhabalia commented on PR #22853:
URL: https://github.com/apache/pulsar/pull/22853#issuecomment-2151011241

   I am not sure how this can help fo fix strict affinity and deadlock issue. also, sorry to say but what we did with #22846 and #22842 was not good where we ignore actual solution without proper review  and other one was merged even if that approach was incorrect. and please advise if anyone has plan to create PR so, one avoid doing duplicate efforts.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [improve] Refactored BK ClientFactory to return futures [pulsar]

Posted by "merlimat (via GitHub)" <gi...@apache.org>.
merlimat merged PR #22853:
URL: https://github.com/apache/pulsar/pull/22853


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org