Skip to content

Revert "[Bug]: pipeline client max connections is too large (#15713)" - #16045

Merged
sukki37 merged 1 commit into
matrixorigin:mainfrom
badboynt1:revert
May 13, 2024
Merged

sukki37 merged 1 commit into
matrixorigin:mainfrom
badboynt1:revert

Conversation

@badboynt1

Copy link
Copy Markdown
Contributor

This reverts commit 2576dbd.

What type of PR is this?

  • API-change
  • BUG
  • Improvement
  • Documentation
  • Feature
  • Test and CI
  • Code Refactoring

Which issue(s) this PR fixes:

issue #12652

What this PR does / why we need it:

Revert "[Bug]: pipeline client max connections is too large (#15713)"

@matrix-meow matrix-meow added the size/XS Denotes a PR that changes [1, 9] lines label May 13, 2024
@mergify mergify Bot added the kind/bug Something isn't working label May 13, 2024
@matrix-meow

Copy link
Copy Markdown
Contributor

@badboynt1 Thanks for your contributions!

Pull Request Review:

Problem 1: Reverting a Previous Bug Fix

  • Description: The pull request is reverting a previous bug fix commit without providing a clear explanation as to why this action is necessary.
  • Suggestion: Before reverting a bug fix, it is crucial to understand the reason behind the original fix and evaluate if reverting it will reintroduce the bug or create new issues. It's recommended to thoroughly test the code to ensure that reverting the changes does not cause any regressions.

Problem 2: Inconsistent Changes in pkg/cnservice/cnclient/client.go

  • Description: In the pkg/cnservice/cnclient/client.go file, the change from c.client.NewStream(backend, false) to c.client.NewStream(backend, true) seems inconsistent and lacks context.
  • Suggestion: Provide a clear explanation in the commit message or comments in the code to explain why the parameter was changed from false to true. Without proper context, future developers may find it difficult to understand the rationale behind this modification.

Problem 3: Significant Increase in dfMaxSenderNumber

  • Description: The dfMaxSenderNumber constant in pkg/cnservice/cnclient/client.go was changed from 10 to 100000, which is a substantial increase.
  • Security Concern: Such a large increase in the maximum number of senders may lead to resource exhaustion or performance issues, especially if not properly managed.
  • Suggestion: Consider the implications of such a significant increase and ensure that the system can handle the potential increase in resource usage. It might be beneficial to introduce dynamic resource allocation or limit the maximum number based on system capabilities.

Problem 4: Unclear Handling of Stream Closure in pkg/sql/compile/scope.go and pkg/sql/compile/scopeRemoteRunTypes.go

  • Description: In both pkg/sql/compile/scope.go and pkg/sql/compile/scopeRemoteRunTypes.go, the change from streamSender.Close(false) to streamSender.Close(true) lacks clear reasoning.
  • Suggestion: Provide comments or documentation explaining the purpose of closing the stream with a true parameter. Without proper documentation, it may be challenging for other developers to understand the intended behavior.

Optimization Opportunity:

  • Consistent Documentation: Ensure that all changes, especially parameter modifications and significant constant value adjustments, are well-documented either in the commit message or with inline comments to provide clarity for future developers.

Overall, it is essential to carefully consider the implications of reverting bug fixes and making significant changes to constants or method parameters. Clear documentation and thorough testing are crucial to maintaining code quality and preventing potential issues.

@sukki37
sukki37 merged commit 591e5e5 into matrixorigin:main May 13, 2024
@badboynt1
badboynt1 deleted the revert branch May 13, 2024 02:27
badboynt1 added a commit to badboynt1/matrixone that referenced this pull request May 13, 2024
badboynt1 added a commit to badboynt1/matrixone that referenced this pull request May 13, 2024
badboynt1 added a commit to badboynt1/matrixone that referenced this pull request May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Something isn't working size/XS Denotes a PR that changes [1, 9] lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants