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

Update go-memdb to fix a goroutine leak #15068

Merged
merged 3 commits into from
Oct 20, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update expected encoding in test
go-memdb was updated in v1.3.3 to make integers in indexes sortable, which changed how integers were encoded.
  • Loading branch information
Chris S. Kim committed Oct 20, 2022
commit a7ea26192b4528101ed48b9ff0d425fb0adf5134
7 changes: 6 additions & 1 deletion agent/consul/state/catalog_oss_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package state

import (
"net"
"strconv"

"github.com/hashicorp/consul/acl"
"github.com/hashicorp/consul/agent/structs"
Expand Down Expand Up @@ -226,7 +227,11 @@ func testIndexerTableGatewayServices() map[string]indexerTestCase {
Service: structs.ServiceName{Name: "SerVice"},
Port: 50123,
}
encodedPort := string([]byte{0x96, 0x8f, 0x06, 0, 0, 0, 0, 0, 0, 0})
encodedPort := string([]byte{0x80, 0, 0, 0, 0, 0, 0xc3, 0xcb})
Copy link
Contributor Author

@kisunji kisunji Oct 20, 2022

Choose a reason for hiding this comment

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

The way integers were encoded was updated in go-memdb@v1.3.3 by hashicorp/go-memdb#114

// On 32-bit systems the int encoding will be different
if strconv.IntSize == 32 {
encodedPort = string([]byte{0x80, 0, 0xc3, 0xcb})
}
return map[string]indexerTestCase{
indexID: {
read: indexValue{
Expand Down