This is an automated email from the ASF dual-hosted git repository.
ritesh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new e57370124a HDDS-11448. Improve documentation in ContainerStateMachine
(#7183)
e57370124a is described below
commit e57370124a36315d2be5791753912901f836ccd8
Author: jianghuazhu <[email protected]>
AuthorDate: Thu Sep 12 05:45:13 2024 +0800
HDDS-11448. Improve documentation in ContainerStateMachine (#7183)
---
.../transport/server/ratis/ContainerStateMachine.java | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
index b3398de07a..9dc6af1935 100644
---
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
+++
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
@@ -233,7 +233,7 @@ public class ContainerStateMachine extends BaseStateMachine
{
// cache with FIFO eviction, and if element not found, this needs
// to be obtained from disk for slow follower
stateMachineDataCache = new ResourceCache<>(
- (index, data) -> ((ByteString)data).size(),
+ (index, data) -> data.size(),
pendingRequestsBytesLimit,
(p) -> {
if (p.wasEvicted()) {
@@ -704,9 +704,10 @@ public class ContainerStateMachine extends
BaseStateMachine {
return chunkExecutors.get(i);
}
- /*
- * writeStateMachineData calls are not synchronized with each other
- * and also with applyTransaction.
+ /**
+ * {@link #writeStateMachineData(ContainerCommandRequestProto, long, long,
long)}
+ * calls are not synchronized with each other
+ * and also with {@link #applyTransaction(TransactionContext)}.
*/
@Override
public CompletableFuture<Message> write(LogEntryProto entry,
TransactionContext trx) {
@@ -824,7 +825,7 @@ public class ContainerStateMachine extends BaseStateMachine
{
}
/**
- * This method is used by the Leader to read state machine date for sending
appendEntries to followers.
+ * This method is used by the Leader to read state machine data for sending
appendEntries to followers.
* It will first get the data from {@link #stateMachineDataCache}.
* If the data is not in the cache, it will read from the file by
dispatching a command
*
@@ -1197,7 +1198,7 @@ public class ContainerStateMachine extends
BaseStateMachine {
try {
containerController.markContainerForClose(cid);
containerController.quasiCloseContainer(cid,
- "Ratis group removed");
+ "Ratis group removed. Group id: " + gid);
} catch (IOException e) {
LOG.debug("Failed to quasi-close container {}", cid);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]