Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Commit

Permalink
IndexSet should be optional in ManyReconciler (#1200)
Browse files Browse the repository at this point in the history
  • Loading branch information
tbak committed Jan 6, 2022
1 parent 4aa4797 commit ae7da58
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import com.netflix.titus.common.util.collections.index.IndexSet;
import com.netflix.titus.common.util.collections.index.IndexSetHolderBasic;
import com.netflix.titus.common.util.collections.index.IndexSetHolderConcurrent;
import com.netflix.titus.common.util.collections.index.Indexes;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.core.scheduler.Scheduler;
Expand Down Expand Up @@ -167,6 +168,12 @@ public Builder<DATA> withTitusRuntime(TitusRuntime titusRuntime) {
public ManyReconciler<DATA> build() {
Preconditions.checkNotNull(name, "Name is null");
Preconditions.checkNotNull(titusRuntime, "TitusRuntime is null");

// Indexes are optional. If not set, provide the default value.
if (indexes == null) {
indexes = Indexes.empty();
}

return shardCount <= 1 ? buildDefaultManyReconciler() : buildShardedManyReconciler();
}

Expand Down

0 comments on commit ae7da58

Please sign in to comment.