Skip to content

Replace copier.Copy with optimized manual deep copy in URL.Clone (#2678) #2812

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

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from

Conversation

Nexusrex18
Copy link
Contributor

This pr is related to pr (#2799 )

@Nexusrex18
Copy link
Contributor Author

@No-SilverBullet @AlexStocks plz review this , i have changed it acc to your suggestions in this new pr and also fixed the cl error.

common/url.go Outdated
@@ -779,6 +779,14 @@ func (c *URL) MergeURL(anotherUrl *URL) *URL {
// After Clone, it is a new URL that there is no thread safe issue.
mergedURL := c.Clone()
params := mergedURL.GetParams()
if params == nil {
mergedURL.paramsLock.Lock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to lock because mergedURL is a local variable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes i have done the changes but getting this drafter error

Copy link
Member

@No-SilverBullet No-SilverBullet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

sonarqubecloud bot commented Apr 5, 2025

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.

4 participants