Skip to content

Commit 5f4ea09

Browse files
authored
Fixed a case where topology info was incorrectly being set (#108)
1 parent dd255d7 commit 5f4ea09

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

driver/src/main/java/oracle/nosql/driver/ops/serde/nson/NsonSerializerFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2670,7 +2670,7 @@ static void readTopologyInfo(ByteInputStream in,
26702670
Result result)
26712671
throws IOException {
26722672

2673-
int proxyTopoSeqNum = 1;
2673+
int proxyTopoSeqNum = -1;
26742674
int[] shardIds = null;
26752675
MapWalker walker = new MapWalker(in);
26762676

driver/src/main/java/oracle/nosql/driver/query/TopologyInfo.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ public class TopologyInfo {
1616
private int[] theShardIds;
1717

1818
public TopologyInfo(int seqNum, int[] shardIds) {
19+
if (shardIds == null) {
20+
throw new IllegalArgumentException("TopologyInfo shardIds must not be null");
21+
}
1922
theSeqNum = seqNum;
2023
theShardIds = shardIds;
2124
}

0 commit comments

Comments
 (0)