Skip to content

Commit 5dc0607

Browse files
committed
Explain usage of LazyInitializer
1 parent bd35bce commit 5dc0607

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/spotify/reaper/service/SegmentRunner.java

+3
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ private void runRepair() {
156156
RepairUnit repairUnit = context.storage.getRepairUnit(segment.getRepairUnitId()).get();
157157
String keyspace = repairUnit.getKeyspaceName();
158158

159+
// If this segment is blocked by other repairs on the hosts involved, we will want to double-
160+
// check with storage, whether those hosts really should be busy with repairs. This listing of
161+
// busy hosts isn't a cheap operation, so only do it (once) when repairs block the segment.
159162
LazyInitializer<Set<String>> busyHosts = new LazyInitializer<Set<String>>() {
160163
@Override
161164
protected Set<String> initialize() {

0 commit comments

Comments
 (0)