satellite/repair/checker: persist placement information to the queue
Change-Id: I51c7fd5a2a38f9f6620c16eddaed3b4915ffd792
This commit is contained in:
parent
18d5caad7e
commit
b4fdc49194
@ -405,6 +405,7 @@ func (fork *observerFork) process(ctx context.Context, segment *rangedloop.Segme
|
||||
Position: segment.Position,
|
||||
UpdatedAt: time.Now().UTC(),
|
||||
SegmentHealth: segmentHealth,
|
||||
Placement: segment.Placement,
|
||||
}, func() {
|
||||
// Counters are increased after the queue has determined
|
||||
// that the segment wasn't already queued for repair.
|
||||
|
@ -607,7 +607,7 @@ func TestObserver_PlacementCheck(t *testing.T) {
|
||||
_, err := planet.Satellites[0].API.Buckets.Service.UpdateBucket(ctx, buckets.Bucket{
|
||||
ProjectID: planet.Uplinks[0].Projects[0].ID,
|
||||
Name: "testbucket",
|
||||
Placement: storj.EU,
|
||||
Placement: storj.PlacementConstraint(1),
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
@ -672,6 +672,8 @@ func TestObserver_PlacementCheck(t *testing.T) {
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, segments[0].StreamID, injuredSegment.StreamID)
|
||||
require.Equal(t, segments[0].Placement, injuredSegment.Placement)
|
||||
require.Equal(t, storj.PlacementConstraint(1), injuredSegment.Placement)
|
||||
|
||||
count, err := repairQueue.Count(ctx)
|
||||
require.Zero(t, err)
|
||||
|
Loading…
Reference in New Issue
Block a user