Skip to content
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

Imp: upgrade getty from 1.4.5 to 1.4.7 #1719

Merged
merged 2 commits into from
Jan 19, 2022
Merged

Conversation

Lvnszn
Copy link
Contributor

@Lvnszn Lvnszn commented Jan 18, 2022

What this PR does:
现在有两种 Panic 的问题被修复了,主要是因为连接中断导致 Connection 这个对象被清理了,然后有其他协程内会执行 Connection 这个对象就会出现 Panic 的问题。

  • 当连接中断的时候,Getty 会收到一个 EOF Error,接着 defer 会执行 gc() 函数,他会把 Connection 设置为 nil。但是有很多个 Task 被放到了 Pool 里面,等待 Pool 调度到 Task 的时候,他会开启协程去执行 Task。这时候 Connection 已经被设置为空了,那么用到 Connection 的函数就会出现 panic 的问题。
  • 在 Dubbo go 中会执行 GetActive 这个函数,GetActive 也是操作 Connection 内的函数,但是其实那时候可能因为上层的超时或者解析失败已经连接中断,那么 Connection 已经被清除了,所以就出现了 Panic 的问题。
    Which issue(s) this PR fixes:
    Fixes dubbo-go 使用1.5.7-rc1版本,运行时偶现getty相关的panic导致重启。 #1650

You should pay attention to items below to ensure your pr passes our ci test
We do not merge pr with ci tests failed

  • All ut passed (run 'go test ./...' in project root)
  • After go-fmt ed , run 'go fmt project' using goland.
  • Golangci-lint passed, run 'sudo golangci-lint run' in project root.
  • After import formatted, (using imports-formatter to run 'imports-formatter .' in project root, to format your import blocks, mentioned in CONTRIBUTING.md above)
  • Your new-created file needs to have apache license at the top, like other existed file does.
  • All integration test passed. You can run integration test locally (with docker env). Clone our dubbo-go-samples project and replace the go.mod to your dubbo-go, and run 'sudo sh start_integration_test.sh' at root of samples project root. (M1 Slice is not Support)

@LaurenceLiZhixin
Copy link
Contributor

@Lvnszn 本地跑下ut?

@LaurenceLiZhixin LaurenceLiZhixin merged commit 97f918d into apache:1.5 Jan 19, 2022
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