diff --git a/go.mod b/go.mod index ee8c8cbb5..2aa58cd58 100644 --- a/go.mod +++ b/go.mod @@ -58,11 +58,11 @@ require ( golang.org/x/time v0.0.0-20200630173020-3af7569d3a1e gopkg.in/segmentio/analytics-go.v3 v3.1.0 gopkg.in/yaml.v3 v3.0.1 - storj.io/common v0.0.0-20230320162442-624d95b0fa7f + storj.io/common v0.0.0-20230403133453-c41ac89d0a5f storj.io/drpc v0.0.33-0.20230329154546-1af8c33020a2 storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41 storj.io/private v0.0.0-20230310092705-eeeca888b55b - storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79 + storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe ) require ( diff --git a/go.sum b/go.sum index 77448b3a7..aff6dd587 100644 --- a/go.sum +++ b/go.sum @@ -968,8 +968,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ= -storj.io/common v0.0.0-20230320162442-624d95b0fa7f h1:riYCjI+x1o3jZSXda9XwLHIEkqphR4Yl+Yqnkm5YKRU= -storj.io/common v0.0.0-20230320162442-624d95b0fa7f/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA= +storj.io/common v0.0.0-20230403133453-c41ac89d0a5f h1:fR5zrhISJnu69erKyDZbNTqiZn047fVhYpKHEvLyonY= +storj.io/common v0.0.0-20230403133453-c41ac89d0a5f/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA= storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg= storj.io/drpc v0.0.33-0.20230329154546-1af8c33020a2 h1:bwj32XFRYPb7LqNxAmP7kqcsxmXla7iygazXDPtzKbU= storj.io/drpc v0.0.33-0.20230329154546-1af8c33020a2/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4= @@ -979,5 +979,5 @@ storj.io/picobuf v0.0.1 h1:ekEvxSQCbEjTVIi/qxj2za13SJyfRE37yE30IBkZeT0= storj.io/picobuf v0.0.1/go.mod h1:7ZTAMs6VesgTHbbhFU79oQ9hDaJ+MD4uoFQZ1P4SEz0= storj.io/private v0.0.0-20230310092705-eeeca888b55b h1:6ehpQF+Miij0P6GjQgO7h6bXpF4dhwl8wxXS8eORtxY= storj.io/private v0.0.0-20230310092705-eeeca888b55b/go.mod h1:JxBlgPwo+P0OOJDSPJLwBJWUPnhnvrHOlKAN0aV/bhY= -storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79 h1:iWSOMIZArkHocAQcDQsP/9UvgFjJEh5WrP8ZtdquCkQ= -storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79/go.mod h1:x6XS4VpmVMU2N/VXm7QGS2M4Ar1+FmWa0lZGYfhMCww= +storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe h1:hQ8pFjgWW6ePpaPhCD3a41eyPnkPIRqJ0deyQc6UpL0= +storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe/go.mod h1:x6XS4VpmVMU2N/VXm7QGS2M4Ar1+FmWa0lZGYfhMCww= diff --git a/satellite/accounting/projectlimitcache.go b/satellite/accounting/projectlimitcache.go index 5d8506db4..e6d4c5d0e 100644 --- a/satellite/accounting/projectlimitcache.go +++ b/satellite/accounting/projectlimitcache.go @@ -58,6 +58,7 @@ func NewProjectLimitCache(db ProjectLimitDB, defaultMaxUsage, defaultMaxBandwidt state: lrucache.New(lrucache.Options{ Capacity: config.CacheCapacity, Expiration: config.CacheExpiration, + Name: "accounting-projectlimit", }), } } diff --git a/satellite/contact/ratelimit.go b/satellite/contact/ratelimit.go index ff5ac4a27..25fd9d702 100644 --- a/satellite/contact/ratelimit.go +++ b/satellite/contact/ratelimit.go @@ -22,7 +22,11 @@ type RateLimiter struct { // NewRateLimiter is a constructor for RateLimiter. func NewRateLimiter(interval time.Duration, burst, numLimits int) *RateLimiter { return &RateLimiter{ - limiters: lrucache.New(lrucache.Options{Expiration: -1, Capacity: numLimits}), + limiters: lrucache.New(lrucache.Options{ + Expiration: -1, + Capacity: numLimits, + Name: "contact-ratelimit", + }), interval: interval, burst: burst, } diff --git a/satellite/metainfo/endpoint.go b/satellite/metainfo/endpoint.go index 1e692a210..9a10a39f4 100644 --- a/satellite/metainfo/endpoint.go +++ b/satellite/metainfo/endpoint.go @@ -121,6 +121,7 @@ func NewEndpoint(log *zap.Logger, buckets *buckets.Service, metabaseDB *metabase limiterCache: lrucache.New(lrucache.Options{ Capacity: config.RateLimiter.CacheCapacity, Expiration: config.RateLimiter.CacheExpiration, + Name: "metainfo-ratelimit", }), encInlineSegmentSize: encInlineSegmentSize, revocations: revocations, diff --git a/satellite/satellitedb/consoledb.go b/satellite/satellitedb/consoledb.go index af78530df..fb102dfca 100644 --- a/satellite/satellitedb/consoledb.go +++ b/satellite/satellitedb/consoledb.go @@ -49,9 +49,11 @@ func (db *ConsoleDB) ProjectMembers() console.ProjectMembers { // APIKeys is a getter for APIKeys repository. func (db *ConsoleDB) APIKeys() console.APIKeys { db.apikeysOnce.Do(func() { + options := db.apikeysLRUOptions + options.Name = "satellitedb-apikeys" db.apikeys = &apikeys{ methods: db.methods, - lru: lrucache.New(db.apikeysLRUOptions), + lru: lrucache.New(options), db: db.db, } }) diff --git a/satellite/satellitedb/database.go b/satellite/satellitedb/database.go index 3786a1868..4f2817d1d 100644 --- a/satellite/satellitedb/database.go +++ b/satellite/satellitedb/database.go @@ -218,9 +218,11 @@ func (dbc *satelliteDBCollection) ProjectAccounting() accounting.ProjectAccounti func (dbc *satelliteDBCollection) Revocation() revocation.DB { db := dbc.getByName("revocation") db.revocationDBOnce.Do(func() { + options := db.opts.RevocationLRUOptions + options.Name = "satellitedb-revocations" db.revocationDB = &revocationDB{ db: db, - lru: lrucache.New(db.opts.RevocationLRUOptions), + lru: lrucache.New(options), methods: db, } }) diff --git a/testsuite/storjscan/go.mod b/testsuite/storjscan/go.mod index 4c89ee40e..c02b2d0be 100644 --- a/testsuite/storjscan/go.mod +++ b/testsuite/storjscan/go.mod @@ -9,11 +9,11 @@ require ( github.com/zeebo/errs v1.3.0 go.uber.org/zap v1.21.0 golang.org/x/sync v0.1.0 - storj.io/common v0.0.0-20230320162442-624d95b0fa7f + storj.io/common v0.0.0-20230403133453-c41ac89d0a5f storj.io/private v0.0.0-20230310092705-eeeca888b55b storj.io/storj v1.63.1 storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0 - storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79 + storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe ) require ( diff --git a/testsuite/storjscan/go.sum b/testsuite/storjscan/go.sum index a10ad7a63..8c92e826f 100644 --- a/testsuite/storjscan/go.sum +++ b/testsuite/storjscan/go.sum @@ -1223,8 +1223,8 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ= -storj.io/common v0.0.0-20230320162442-624d95b0fa7f h1:riYCjI+x1o3jZSXda9XwLHIEkqphR4Yl+Yqnkm5YKRU= -storj.io/common v0.0.0-20230320162442-624d95b0fa7f/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA= +storj.io/common v0.0.0-20230403133453-c41ac89d0a5f h1:fR5zrhISJnu69erKyDZbNTqiZn047fVhYpKHEvLyonY= +storj.io/common v0.0.0-20230403133453-c41ac89d0a5f/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA= storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg= storj.io/drpc v0.0.33-0.20230329154546-1af8c33020a2 h1:bwj32XFRYPb7LqNxAmP7kqcsxmXla7iygazXDPtzKbU= storj.io/drpc v0.0.33-0.20230329154546-1af8c33020a2/go.mod h1:vR804UNzhBa49NOJ6HeLjd2H3MakC1j5Gv8bsOQT6N4= @@ -1236,5 +1236,5 @@ storj.io/private v0.0.0-20230310092705-eeeca888b55b h1:6ehpQF+Miij0P6GjQgO7h6bXp storj.io/private v0.0.0-20230310092705-eeeca888b55b/go.mod h1:JxBlgPwo+P0OOJDSPJLwBJWUPnhnvrHOlKAN0aV/bhY= storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0 h1:pSfGf9E9OlUd17W7LSpL4tTONIyFji6dz8I2iTDd8BY= storj.io/storjscan v0.0.0-20220926140643-1623c3b391b0/go.mod h1:5nLgAOl1KTDVyqORAhvrp+167PtShEuS1L3pJgXPjwo= -storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79 h1:iWSOMIZArkHocAQcDQsP/9UvgFjJEh5WrP8ZtdquCkQ= -storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79/go.mod h1:x6XS4VpmVMU2N/VXm7QGS2M4Ar1+FmWa0lZGYfhMCww= +storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe h1:hQ8pFjgWW6ePpaPhCD3a41eyPnkPIRqJ0deyQc6UpL0= +storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe/go.mod h1:x6XS4VpmVMU2N/VXm7QGS2M4Ar1+FmWa0lZGYfhMCww= diff --git a/testsuite/ui/go.mod b/testsuite/ui/go.mod index 21b4613b7..b714967c7 100644 --- a/testsuite/ui/go.mod +++ b/testsuite/ui/go.mod @@ -10,7 +10,7 @@ require ( github.com/spf13/pflag v1.0.5 github.com/stretchr/testify v1.8.2 go.uber.org/zap v1.23.0 - storj.io/common v0.0.0-20230320162442-624d95b0fa7f + storj.io/common v0.0.0-20230403133453-c41ac89d0a5f storj.io/gateway-mt v1.49.0 storj.io/private v0.0.0-20230310092705-eeeca888b55b storj.io/storj v0.12.1-0.20221125175451-ef4b564b82f7 @@ -222,5 +222,5 @@ require ( storj.io/minio v0.0.0-20230118205046-c025fcc9eef3 // indirect storj.io/monkit-jaeger v0.0.0-20220915074555-d100d7589f41 // indirect storj.io/picobuf v0.0.1 // indirect - storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79 // indirect + storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe // indirect ) diff --git a/testsuite/ui/go.sum b/testsuite/ui/go.sum index 67c8be7d7..3ac60fdd4 100644 --- a/testsuite/ui/go.sum +++ b/testsuite/ui/go.sum @@ -1927,8 +1927,8 @@ sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1 sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck= sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0= storj.io/common v0.0.0-20220719163320-cd2ef8e1b9b0/go.mod h1:mCYV6Ud5+cdbuaxdPD5Zht/HYaIn0sffnnws9ErkrMQ= -storj.io/common v0.0.0-20230320162442-624d95b0fa7f h1:riYCjI+x1o3jZSXda9XwLHIEkqphR4Yl+Yqnkm5YKRU= -storj.io/common v0.0.0-20230320162442-624d95b0fa7f/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA= +storj.io/common v0.0.0-20230403133453-c41ac89d0a5f h1:fR5zrhISJnu69erKyDZbNTqiZn047fVhYpKHEvLyonY= +storj.io/common v0.0.0-20230403133453-c41ac89d0a5f/go.mod h1:mYWledc0VY1J4+merC3LIFZr0Wa4FaB/hg0ucMdYnzA= storj.io/dotworld v0.0.0-20210324183515-0d11aeccd840 h1:oqMwoF6vaOrCe92SKRyr8cc2WSjLYAd8fjpAHA7rNqY= storj.io/drpc v0.0.32/go.mod h1:6rcOyR/QQkSTX/9L5ZGtlZaE2PtXTTZl8d+ulSeeYEg= storj.io/drpc v0.0.33-0.20230329154546-1af8c33020a2 h1:bwj32XFRYPb7LqNxAmP7kqcsxmXla7iygazXDPtzKbU= @@ -1945,6 +1945,6 @@ storj.io/picobuf v0.0.1 h1:ekEvxSQCbEjTVIi/qxj2za13SJyfRE37yE30IBkZeT0= storj.io/picobuf v0.0.1/go.mod h1:7ZTAMs6VesgTHbbhFU79oQ9hDaJ+MD4uoFQZ1P4SEz0= storj.io/private v0.0.0-20230310092705-eeeca888b55b h1:6ehpQF+Miij0P6GjQgO7h6bXpF4dhwl8wxXS8eORtxY= storj.io/private v0.0.0-20230310092705-eeeca888b55b/go.mod h1:JxBlgPwo+P0OOJDSPJLwBJWUPnhnvrHOlKAN0aV/bhY= -storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79 h1:iWSOMIZArkHocAQcDQsP/9UvgFjJEh5WrP8ZtdquCkQ= -storj.io/uplink v1.10.1-0.20230317162227-f9e94287ad79/go.mod h1:x6XS4VpmVMU2N/VXm7QGS2M4Ar1+FmWa0lZGYfhMCww= +storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe h1:hQ8pFjgWW6ePpaPhCD3a41eyPnkPIRqJ0deyQc6UpL0= +storj.io/uplink v1.10.1-0.20230331141033-1b3a2ee2cdbe/go.mod h1:x6XS4VpmVMU2N/VXm7QGS2M4Ar1+FmWa0lZGYfhMCww= storj.io/zipper v0.0.0-20220124122551-2ac2d53a46f6 h1:vJQmb+uAiYn8hVfkhMl6OqjnUyMWSCPnkzW8IsjF8vE=