Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public ContainerStateMachine(HddsDatanodeService hddsDatanodeService, RaftGroupI
// 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()) {
Expand Down Expand Up @@ -704,9 +704,10 @@ private ExecutorService getChunkExecutor(WriteChunkRequestProto req) {
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) {
Expand Down Expand Up @@ -824,7 +825,7 @@ public CompletableFuture<Void> flush(long index) {
}

/**
* 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
*
Expand Down Expand Up @@ -1197,7 +1198,7 @@ public void notifyGroupRemove() {
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);
}
Expand Down