Skip to content

Commit

Permalink
satellite/rangedloop: disable durability observer loop for countries
Browse files Browse the repository at this point in the history
We have lot of OOM problem with ranged loop. We are planning to use the same indexing in all durability loops, but until that we can disable the country based durability loop, as it's not very important: we don't expect any internet breakdown in any countries...

Change-Id: I722b504bdcc0067260dab23281d7e543101c03fe
  • Loading branch information
elek authored and jtolio committed Jan 2, 2024
1 parent 4e06e75 commit cb6fb07
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 11 additions & 3 deletions satellite/durability/observer_integration_test.go
Expand Up @@ -15,6 +15,7 @@ import (
"storj.io/common/testcontext"
"storj.io/storj/private/testplanet"
"storj.io/storj/satellite/durability"
"storj.io/storj/storagenode"
)

func TestDurabilityIntegration(t *testing.T) {
Expand All @@ -24,6 +25,11 @@ func TestDurabilityIntegration(t *testing.T) {
UplinkCount: 1,
Reconfigure: testplanet.Reconfigure{
Satellite: testplanet.ReconfigureRS(3, 5, 6, 6),
StorageNode: func(index int, config *storagenode.Config) {
if index > 2 {
config.Operator.Email = "test@storj.io"
}
},
},
}, func(t *testing.T, ctx *testcontext.Context, planet *testplanet.Planet) {

Expand Down Expand Up @@ -67,9 +73,11 @@ func TestDurabilityIntegration(t *testing.T) {
_, err := rangedLoopService.RunOnce(ctx)
require.NoError(t, err)

require.Len(t, result, 19)
// one or two pieces are controlled out of the 5-6 --> 3 or 4 pieces are available without HU nodes
require.Equal(t, result["HU"].Min(), 4)
require.Len(t, result, 14)

// we used all 3 test@storj.io, and 6 pieces. Without test@storj.io, only 3 remained.
require.NotNil(t, result["test@storj.io"])
require.Equal(t, result["test@storj.io"].Min(), 3)

})
}
3 changes: 0 additions & 3 deletions satellite/rangedloop.go
Expand Up @@ -140,9 +140,6 @@ func NewRangedLoop(log *zap.Logger, db DB, metabaseDB *metabase.DB, config *Conf
"net": func(node *nodeselection.SelectedNode) string {
return node.LastNet
},
"country": func(node *nodeselection.SelectedNode) string {
return node.CountryCode.String()
},
}
for class, f := range classes {
peer.DurabilityReport.Observer = append(peer.DurabilityReport.Observer, durability.NewDurability(db.OverlayCache(), metabaseDB, class, f, config.Metainfo.RS.Total, config.Metainfo.RS.Repair, config.Metainfo.RS.Repair-config.Metainfo.RS.Min, config.RangedLoop.AsOfSystemInterval))
Expand Down

0 comments on commit cb6fb07

Please sign in to comment.