Skip to content

Commit

Permalink
1. default map value should have Boundary comparator. (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gujiawei-Edinburgh authored Dec 27, 2024
1 parent f9aeea2 commit b62be9d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import static com.baidu.bifromq.basekv.utils.DescriptorUtil.getEffectiveEpoch;
import static com.baidu.bifromq.basekv.utils.DescriptorUtil.toLeaderRanges;
import static java.util.Collections.emptyMap;
import static java.util.Collections.emptyNavigableMap;

import com.baidu.bifromq.basecrdt.core.api.IORMap;
import com.baidu.bifromq.basecrdt.service.ICRDTService;
Expand Down Expand Up @@ -57,6 +56,7 @@
import com.baidu.bifromq.basekv.store.proto.ReplyCode;
import com.baidu.bifromq.basekv.store.proto.TransferLeadershipReply;
import com.baidu.bifromq.basekv.store.proto.TransferLeadershipRequest;
import com.baidu.bifromq.basekv.utils.BoundaryUtil;
import com.baidu.bifromq.basekv.utils.DescriptorUtil;
import com.baidu.bifromq.basekv.utils.KeySpaceDAG;
import com.baidu.bifromq.baserpc.BluePrint;
Expand All @@ -79,6 +79,7 @@
import java.util.List;
import java.util.Map;
import java.util.NavigableMap;
import java.util.TreeMap;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -111,7 +112,7 @@ private record ClusterInfo(Map<String, KVRangeStoreDescriptor> storeDescriptors,
private final Subject<Map<String, String>> storeToServerSubject = BehaviorSubject.createDefault(Maps.newHashMap());
private final Observable<ClusterInfo> clusterInfoObservable;
private final BehaviorSubject<NavigableMap<Boundary, KVRangeSetting>> effectiveRouterSubject =
BehaviorSubject.createDefault(emptyNavigableMap());
BehaviorSubject.createDefault(new TreeMap<>(BoundaryUtil::compare));

// key: serverId, val: storeId
private volatile Map<String, String> serverToStoreMap = Maps.newHashMap();
Expand Down

0 comments on commit b62be9d

Please sign in to comment.