flycash opened a new pull request #519:
URL: https://github.com/apache/dubbo-go/pull/519


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   
   Remove the RWLock from baseURL
   
   **Which issue(s) this PR fixes**:
   
   As my understanding, the URL struct should be immutable. But there are some 
Set* and Add* methods which can modify the URL's instance.
   
   However, we need those methods to create a URL's instance. But the instance 
should not be modified anymore after finish initialization.
   
   Another concern is that when we try to clone a URL instance, the lock will 
be cloned too. It will cause some concurrent problems.
   
   Thus remove this lock will be more reasonable. 
   
   As the expense of that, the developer should be more careful to use the URL, 
especially when they decide to invoke Set* or Add* method.
   
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related 
issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #
   
   **Special notes for your reviewer**:
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires 
additional action from users switching to the new release, include the string 
"action required".
   -->
   ```release-note
   
   ```


----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to