szetszwo commented on code in PR #8022:
URL: https://github.com/apache/ozone/pull/8022#discussion_r1991740541
##########
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/ScmConfigKeys.java:
##########
@@ -632,7 +632,9 @@ public final class ScmConfigKeys {
public static final String NET_TOPOLOGY_NODE_SWITCH_MAPPING_IMPL_KEY =
"net.topology.node.switch.mapping.impl";
-
+ public static final String
HDDS_CONTAINER_RATIS_STATEMACHINE_WRITE_WAIT_INTERVAL
+ = "hdds.container.ratis.statemachine.write.wait.interval";
+ public static final long
HDDS_CONTAINER_RATIS_STATEMACHINE_WRITE_WAIT_INTERVAL_NS_DEFAULT = 10 * 60 *
1000_1000_1000L;
Review Comment:
TYPO: `1000_1000_1000L` should be `1000_000_000L`
##########
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java:
##########
@@ -819,9 +896,13 @@ private ByteString readStateMachineData(
*/
@Override
public CompletableFuture<Void> flush(long index) {
- return CompletableFuture.allOf(
- writeChunkFutureMap.entrySet().stream().filter(x -> x.getKey() <=
index)
- .map(Map.Entry::getValue).toArray(CompletableFuture[]::new));
+ final SortedMap<Long, WriteFutures> head =
writeChunkFutureMap.headMap(index + 1);
Review Comment:
Minor: it may be better to use `headMap(index, true)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]