Skip to content

Commit

Permalink
Try to fix lock contention (#1610)
Browse files Browse the repository at this point in the history
* lock contention fix [goreleaser]

* update

* fix bridge fallbacks [goreleaser]

* disable querying to save clickhouse [goreleaser]

* crash fix [goreleaser]

* fix lock contention again

* rip planck

---------

Co-authored-by: Trajan0x <[email protected]>
  • Loading branch information
trajan0x and trajan0x authored Dec 12, 2023
1 parent 281439a commit f92d9c3
Show file tree
Hide file tree
Showing 12 changed files with 2,629 additions and 128 deletions.
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.github/workflows/solidity.yml @trajan0x @ChiTimesChi

.vscode/ @trajan0x @ChiTimesChi
agents/ @trajan0x @ChiTimesChi @CryptoMaxPlanck
agents/ @trajan0x @ChiTimesChi
core/ @trajan0x
charts/ @trajan0x @bsgrigorov
docker/ @trajan0x @bsgrigorov
Expand All @@ -25,7 +25,7 @@ contrib/ @trajan0x

services/explorer @trajan0x @nautsimon
services/omnirpc @trajan0x @nautsimon
services/scribe @trajan0x @nautsimon @CryptoMaxPlanck
services/scribe @trajan0x @nautsimon

tools/ @trajan0x

Expand Down
14 changes: 7 additions & 7 deletions contrib/promexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@ require (
require (
bitbucket.org/tentontrain/math v0.0.0-20220519191623-a4e86beba92a // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/ClickHouse/ch-go v0.47.3 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.3.0 // indirect
github.com/ClickHouse/ch-go v0.53.0 // indirect
github.com/ClickHouse/clickhouse-go/v2 v2.8.3 // indirect
github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 // indirect
github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect
github.com/Microsoft/go-winio v0.6.1 // indirect
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 // indirect
github.com/VictoriaMetrics/fastcache v1.6.0 // indirect
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/badoux/checkmail v0.0.0-20181210160741-9661bd69e9ad // indirect
github.com/benbjohnson/immutable v0.4.3 // indirect
Expand Down Expand Up @@ -133,7 +133,7 @@ require (
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
github.com/keep-network/keep-common v1.7.1-0.20211012131917-7102d7b9c6a0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
Expand All @@ -157,10 +157,10 @@ require (
github.com/palantir/pkg/safejson v1.0.1 // indirect
github.com/palantir/pkg/safeyaml v1.0.1 // indirect
github.com/palantir/pkg/transform v1.0.0 // indirect
github.com/paulmach/orb v0.7.1 // indirect
github.com/paulmach/orb v0.9.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.2.0-beta.2 // indirect
Expand Down Expand Up @@ -241,7 +241,7 @@ require (
gopkg.in/natefinch/npipe.v2 v2.0.0-20160621034901-c1b8fa8bdcce // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
gorm.io/driver/clickhouse v0.4.2 // indirect
gorm.io/driver/clickhouse v0.5.1 // indirect
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55 // indirect
k8s.io/apimachinery v0.25.5 // indirect
k8s.io/klog/v2 v2.80.1 // indirect
Expand Down
784 changes: 763 additions & 21 deletions contrib/promexporter/go.sum

Large diffs are not rendered by default.

1,121 changes: 1,067 additions & 54 deletions go.work.sum

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions services/explorer/api/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import (
gosql "database/sql"
"fmt"
serverConfig "github.com/synapsecns/sanguine/services/explorer/config/server"
"github.com/synapsecns/sanguine/services/explorer/graphql/server/graph"
"math/big"
"net/http"
"testing"
"time"

"github.com/phayes/freeport"
. "github.com/stretchr/testify/assert"
Expand Down Expand Up @@ -210,6 +212,12 @@ func (g *APISuite) SetupSuite() {
func (g *APISuite) SetupTest() {
g.TestSuite.SetupTest()

initialFallback := graph.GetFallbackTime()
graph.UnsafeSetFallbackTime(time.Second * 20)
g.TestSuite.DeferAfterTest(func() {
graph.UnsafeSetFallbackTime(initialFallback)
})

g.db, g.eventDB, g.gqlClient, g.logIndex, g.cleanup, g.testBackend, g.deployManager = testutil.NewTestEnvDB(g.GetTestContext(), g.T(), g.scribeMetrics)

cleanup, port, err := clickhouse.NewClickhouseStore("explorer")
Expand Down
15 changes: 7 additions & 8 deletions services/explorer/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ replace (

require (
github.com/99designs/gqlgen v0.17.36
github.com/ClickHouse/clickhouse-go/v2 v2.3.0
github.com/ClickHouse/clickhouse-go/v2 v2.8.3
github.com/Flaque/filet v0.0.0-20201012163910-45f684403088
github.com/MichaelMure/go-term-markdown v0.1.4
github.com/Yamashou/gqlgenc v0.10.0
Expand Down Expand Up @@ -46,7 +46,7 @@ require (
go.uber.org/atomic v1.10.0
golang.org/x/sync v0.3.0
gopkg.in/yaml.v2 v2.4.0
gorm.io/driver/clickhouse v0.4.2
gorm.io/driver/clickhouse v0.5.1
gorm.io/gorm v1.25.2-0.20230530020048-26663ab9bf55
k8s.io/apimachinery v0.25.5
)
Expand All @@ -55,7 +55,7 @@ require (
bitbucket.org/tentontrain/math v0.0.0-20220519191623-a4e86beba92a // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
github.com/ClickHouse/ch-go v0.47.3 // indirect
github.com/ClickHouse/ch-go v0.53.0 // indirect
github.com/ImVexed/fasturl v0.0.0-20230304231329-4e41488060f3 // indirect
github.com/LK4d4/trylock v0.0.0-20191027065348-ff7e133a5c54 // indirect
github.com/MichaelMure/go-term-text v0.3.1 // indirect
Expand All @@ -66,7 +66,7 @@ require (
github.com/acomagu/bufpipe v1.0.4 // indirect
github.com/agnivade/levenshtein v1.1.1 // indirect
github.com/alecthomas/chroma v0.7.1 // indirect
github.com/andybalholm/brotli v1.0.4 // indirect
github.com/andybalholm/brotli v1.0.5 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/badoux/checkmail v0.0.0-20181210160741-9661bd69e9ad // indirect
github.com/beorn7/perks v1.0.1 // indirect
Expand Down Expand Up @@ -163,7 +163,7 @@ require (
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a // indirect
github.com/keep-network/keep-common v1.7.1-0.20211012131917-7102d7b9c6a0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.15.12 // indirect
github.com/klauspost/compress v1.16.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.4 // indirect
github.com/kyokomi/emoji/v2 v2.2.8 // indirect
github.com/leodido/go-urn v1.2.4 // indirect
Expand All @@ -186,7 +186,6 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/neverlee/keymutex v0.0.0-20171121013845-f593aa834bf9 // indirect
github.com/nxadm/tail v1.4.8 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
Expand All @@ -197,11 +196,11 @@ require (
github.com/palantir/pkg/safejson v1.0.1 // indirect
github.com/palantir/pkg/safeyaml v1.0.1 // indirect
github.com/palantir/pkg/transform v1.0.0 // indirect
github.com/paulmach/orb v0.7.1 // indirect
github.com/paulmach/orb v0.9.0 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/peterh/liner v1.2.1 // indirect
github.com/pierrec/lz4/v4 v4.1.15 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pkg/term v1.2.0-beta.2 // indirect
Expand Down
Loading

0 comments on commit f92d9c3

Please sign in to comment.