Skip to content

Commit

Permalink
Use mutable set
Browse files Browse the repository at this point in the history
  • Loading branch information
AmatyaAvadhanula committed Oct 9, 2023
1 parent c131323 commit a4f605d
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1698,11 +1698,9 @@ private SegmentIdWithShardSpec createNewSegment(
// across all shard specs (published + pending).
// A pending segment having a higher partitionId must also be considered
// to avoid clashes when inserting the pending segment created here.
final Set<SegmentIdWithShardSpec> pendings = getPendingSegmentsForIntervalWithHandle(
handle,
dataSource,
interval
).keySet();
final Set<SegmentIdWithShardSpec> pendings = new HashSet<>(
getPendingSegmentsForIntervalWithHandle( handle, dataSource, interval).keySet()
);
if (committedMaxId != null) {
pendings.add(committedMaxId);
}
Expand Down

0 comments on commit a4f605d

Please sign in to comment.