Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Commit 8a959d0

Browse files
authored
Fix example in README for AdjacentParentShardId
1 parent 2b25b7e commit 8a959d0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,10 @@ For example, users may want to fully read any parent shards before starting to r
588588
```java
589589
openShards -> {
590590
Set<String> openShardIds = openShards.stream().map(Shard::getShardId).collect(Collectors.toSet());
591-
// only return open shards which have no parent available for reading
591+
// only return open shards which have no parent available for reading
592592
return openShards.stream()
593-
.filter(shard -> !openShardIds.contains(shard.getParentShardId()))
593+
.filter(shard -> !openShardIds.contains(shard.getParentShardId())
594+
&& !openShardIds.contains(shard.getAdjacentParentShardId()))
594595
.collect(Collectors.toList());
595596
}
596597
```

0 commit comments

Comments
 (0)