@@ -111,13 +111,16 @@ func (rjq *RepairJobQueue) Select(ctx context.Context, limit int, includedPlacem
111111 attemptedAt = & t
112112 }
113113 seg := queue.InjuredSegment {
114- StreamID : job .ID .StreamID ,
115- Position : metabase .SegmentPositionFromEncoded (job .ID .Position ),
116- SegmentHealth : job .Health ,
117- AttemptedAt : attemptedAt ,
118- UpdatedAt : time .Unix (int64 (job .UpdatedAt ), 0 ),
119- InsertedAt : time .Unix (int64 (job .InsertedAt ), 0 ),
120- Placement : storj .PlacementConstraint (job .Placement ),
114+ StreamID : job .ID .StreamID ,
115+ Position : metabase .SegmentPositionFromEncoded (job .ID .Position ),
116+ SegmentHealth : job .Health ,
117+ AttemptedAt : attemptedAt ,
118+ UpdatedAt : time .Unix (int64 (job .UpdatedAt ), 0 ),
119+ InsertedAt : time .Unix (int64 (job .InsertedAt ), 0 ),
120+ Placement : storj .PlacementConstraint (job .Placement ),
121+ NumNormalizedRetrievable : job .NumNormalizedRetrievable ,
122+ NumNormalizedHealthy : job .NumNormalizedHealthy ,
123+ NumOutOfPlacement : job .NumOutOfPlacement ,
121124 }
122125 injuredSegments = append (injuredSegments , seg )
123126 }
@@ -138,12 +141,15 @@ func (rjq *RepairJobQueue) Release(ctx context.Context, job queue.InjuredSegment
138141 // would be left in the queue under PostgreSQL/Cockroach,
139142 // just with an updated LastAttemptedAt.
140143 rJob := RepairJob {
141- ID : SegmentIdentifier {StreamID : job .StreamID , Position : job .Position .Encode ()},
142- Health : job .SegmentHealth ,
143- InsertedAt : uint64 (job .InsertedAt .Unix ()),
144- LastAttemptedAt : ServerTimeNow ,
145- UpdatedAt : uint64 (job .UpdatedAt .Unix ()),
146- Placement : uint16 (job .Placement ),
144+ ID : SegmentIdentifier {StreamID : job .StreamID , Position : job .Position .Encode ()},
145+ Health : job .SegmentHealth ,
146+ InsertedAt : uint64 (job .InsertedAt .Unix ()),
147+ LastAttemptedAt : ServerTimeNow ,
148+ UpdatedAt : uint64 (job .UpdatedAt .Unix ()),
149+ Placement : uint16 (job .Placement ),
150+ NumNormalizedHealthy : job .NumNormalizedHealthy ,
151+ NumNormalizedRetrievable : job .NumNormalizedRetrievable ,
152+ NumOutOfPlacement : job .NumOutOfPlacement ,
147153 }
148154 rJob .NumAttempts ++
149155 _ , err := rjq .jobqClient .Push (ctx , rJob )
@@ -171,13 +177,16 @@ func (rjq *RepairJobQueue) SelectN(ctx context.Context, limit int) ([]queue.Inju
171177 attemptedAt = & t
172178 }
173179 seg := queue.InjuredSegment {
174- StreamID : job .ID .StreamID ,
175- Position : metabase .SegmentPositionFromEncoded (job .ID .Position ),
176- SegmentHealth : job .Health ,
177- AttemptedAt : attemptedAt ,
178- UpdatedAt : time .Unix (int64 (job .UpdatedAt ), 0 ),
179- InsertedAt : time .Unix (int64 (job .InsertedAt ), 0 ),
180- Placement : storj .PlacementConstraint (job .Placement ),
180+ StreamID : job .ID .StreamID ,
181+ Position : metabase .SegmentPositionFromEncoded (job .ID .Position ),
182+ SegmentHealth : job .Health ,
183+ AttemptedAt : attemptedAt ,
184+ UpdatedAt : time .Unix (int64 (job .UpdatedAt ), 0 ),
185+ InsertedAt : time .Unix (int64 (job .InsertedAt ), 0 ),
186+ Placement : storj .PlacementConstraint (job .Placement ),
187+ NumNormalizedRetrievable : job .NumNormalizedRetrievable ,
188+ NumNormalizedHealthy : job .NumNormalizedHealthy ,
189+ NumOutOfPlacement : job .NumOutOfPlacement ,
181190 }
182191 injuredSegments = append (injuredSegments , seg )
183192 }
0 commit comments