dubbogo / gost Goto Github PK
View Code? Open in Web Editor NEWdubbogo golang standard library
License: Apache License 2.0
dubbogo golang standard library
License: Apache License 2.0
[func NewDecFromFloatForTest(f float64) *Decimal {](
Line 2279 in 9adb81a
What happened:
A total of two defective components with vulnerabilities were introduced into the project. The following are some of the main information:
infomation: https://www.oscs1024.com/cd/1530636116259217408?sign=c65eceeb
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
What would you like to be added:
根据 gost 各个 package 的意义,改进 readme 内容。
Why is this needed:
方便用户使用 gost 库。
CPrintfln方法中fmt.Fprint应为fmt.Fprintf
What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
../../../go/goworks/pkg/mod/dubbo.apache.org/dubbo-go/[email protected]/remoting/nacos/builder.go:52:60: cannot use sc (variable of type []"github.com/nacos-group/nacos-sdk-go/common/constant".ServerConfig) as []"github.com/nacos-group/nacos-sdk-go/v2/common/constant".ServerConfig value in argument to nacosClient.NewNacosConfigClient
..
What happened:
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
What happened:
in database/kv/zk/client.go, gost ignores the error of node exists, and when I try to create some node (like dubbo/config) I didn't know it exists with CreateWithValue, I got no error and I thought it worked, but in fact, it failed.
What you expected to happen:
When I try to create some node that exists, I want to know it, and then I can use SetContent to modify it.
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
What would you like to be added:
When the current AcquireBytes function misses a byte slice in the pool, it will return a byte slice with a length of 0 and a cap of size, and when it hits, it will return a slice with both length and cap of size. I think consistency is more user friendly
Why is this needed:
When the current AcquireBytes function misses a byte slice in the pool, it will return a byte slice with a length of 0 and a cap of size, and when it hits, it will return a slice with both length and cap of size. I think consistency is more user friendly
What happened:
DefaultHandler#HandleZkEvent,这段代码有以下问题,看注释:
func (d *DefaultHandler) HandleZkEvent(z *ZookeeperClient) {
var (
state int
event zk.Event
)
for {
select {
case event = <-z.Session:
// 直接用 event.Stata 就可以对比,int 多余
switch (int)(event.State) {
case (int)(zk.StateDisconnected):
atomic.StoreUint32(&z.valid, 0)
// 第一个和第三个 case 都是用状态码来匹配,但这一个 case 是用的事件类型来匹配,逻辑有大问题,
// 但是 go-zookeeper 并没有定义连接成功的状态码(3),而 EventNodeDataChanged 的值也是 3,因此正好进入这个分支
case (int)(zk.EventNodeDataChanged), (int)(zk.EventNodeChildrenChanged):
z.eventRegistryLock.RLock()
for p, a := range z.eventRegistry {
if strings.HasPrefix(p, event.Path) {
for _, e := range a {
*e <- struct{}{}
}
}
}
z.eventRegistryLock.RUnlock()
case (int)(zk.StateConnecting), (int)(zk.StateConnected), (int)(zk.StateHasSession):
if state == (int)(zk.StateHasSession) {
continue
}
if event.State == zk.StateHasSession {
atomic.StoreUint32(&z.valid, 1)
//if this is the first connection, don't trigger reconnect event
if !atomic.CompareAndSwapUint32(&z.initialized, 0, 1) {
close(z.reconnectCh)
z.reconnectCh = make(chan struct{})
}
}
z.eventRegistryLock.RLock()
if a, ok := z.eventRegistry[event.Path]; ok && 0 < len(a) {
for _, e := range a {
*e <- struct{}{}
}
}
z.eventRegistryLock.RUnlock()
}
state = (int)(event.State)
}
}
}
What you expected to happen:
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
What happened:
WARNING: DATA RACE
Write at 0x000000722aa8 by goroutine 6:
github.com/dubbogo/gost/sync.restore.func1()
/home/travis/gopath/src/github.com/dubbogo/gost/sync/deadlock_test.go:162 +0x4c
github.com/dubbogo/gost/sync.TestNoDeadlocks()
/home/travis/gopath/src/github.com/dubbogo/gost/sync/deadlock_test.go:62 +0x23e
testing.tRunner()
/home/travis/.gimme/versions/go1.12.linux.amd64/src/testing/testing.go:865 +0x163
Previous read at 0x000000722aa8 by goroutine 56:
github.com/dubbogo/gost/sync.lock.func1()
/home/travis/gopath/src/github.com/dubbogo/gost/sync/deadlock.go:184 +0x76
What you expected to happen:
No race
How to reproduce it (as minimally and precisely as possible):
go test ./... -race
Anything else we need to know?:
What happened:go get fail
What you expected to happen:go get success
How to reproduce it (as minimally and precisely as possible): go get github.com/dubbogo/[email protected]
Anything else we need to know?:go get github.com/dubbogo/[email protected]
go get: github.com/dubbogo/[email protected] requires
github.com/coreos/[email protected]: invalid version: unknown revision 000000000000
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.