Skip to content

NewConnectionID isn't global unique #288

@cnlangzi

Description

@cnlangzi

func newConnectionID() string {

connection_id is primary key in blobber's database. But NewConnectionID isn't global unique. It is a simple random number. It will make a lot of upload fail when blobber is running for long time.

func NewConnectionId() string {
nBig, err := rand.Int(rand.Reader, big.NewInt(0xffffffff))
if err != nil {
panic(err)
}
return fmt.Sprintf("%d", nBig.Int64())
}

linked to 0chain/gosdk#178

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions