Skip to content

Commit

Permalink
Merge pull request #194 from ydb-platform/disjoint_set_remove_map_con…
Browse files Browse the repository at this point in the history
…currency

Refactor: change map implementation in disjoint set
  • Loading branch information
pnv1 authored Oct 30, 2023
2 parents bca9e3d + 9b0ef61 commit bfda182
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.concurrent.ConcurrentSkipListMap;
import java.util.TreeMap;

import tech.ydb.topic.read.OffsetsRange;

/**
* @author Nikolay Perfilov
*/
public class DisjointOffsetRangeSet {
private final NavigableMap<Long, OffsetsRangeImpl> ranges = new ConcurrentSkipListMap<>();
private final NavigableMap<Long, OffsetsRangeImpl> ranges = new TreeMap<>();

public void add(OffsetsRange rangeToCommit) {
Map.Entry<Long, OffsetsRangeImpl> floorEntry = ranges.floorEntry(rangeToCommit.getStart());
Expand Down

0 comments on commit bfda182

Please sign in to comment.