diff --git a/topic/src/main/java/tech/ydb/topic/read/impl/DisjointOffsetRangeSet.java b/topic/src/main/java/tech/ydb/topic/read/impl/DisjointOffsetRangeSet.java index 5f0988487..41ec47ec7 100644 --- a/topic/src/main/java/tech/ydb/topic/read/impl/DisjointOffsetRangeSet.java +++ b/topic/src/main/java/tech/ydb/topic/read/impl/DisjointOffsetRangeSet.java @@ -5,7 +5,7 @@ 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; @@ -13,7 +13,7 @@ * @author Nikolay Perfilov */ public class DisjointOffsetRangeSet { - private final NavigableMap ranges = new ConcurrentSkipListMap<>(); + private final NavigableMap ranges = new TreeMap<>(); public void add(OffsetsRange rangeToCommit) { Map.Entry floorEntry = ranges.floorEntry(rangeToCommit.getStart());