[
https://issues.apache.org/jira/browse/HDDS-1766?focusedWorklogId=274886&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-274886
]
ASF GitHub Bot logged work on HDDS-1766:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Jul/19 14:33
Start Date: 10/Jul/19 14:33
Worklog Time Spent: 10m
Work Description: lokeshj1703 commented on pull request #1072: HDDS-1766.
ContainerStateMachine is unable to increment lastAppliedTermIndex. Contributed
by Mukul Kumar Singh.
URL: https://github.com/apache/hadoop/pull/1072#discussion_r302098470
##########
File path:
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/ContainerStateMachine.java
##########
@@ -554,12 +556,12 @@ private ByteString getCachedStateMachineData(Long
logIndex, long term,
}
} catch (Exception e) {
metrics.incNumReadStateMachineFails();
- LOG.error("unable to read stateMachineData:" + e);
+ LOG.error("{} unable to read stateMachineData:", gid, e);
return completeExceptionally(e);
}
}
- private void updateLastApplied() {
+ private synchronized void updateLastApplied() {
Review comment:
@mukul1987 Thanks for working on this! The patch looks good to me.
I think we can avoid using synchronized by using a concurrent sorted map.
Each applyTransaction removes its corresponding entry from the map and we
update lastApplied based on the first entry in the map?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 274886)
Time Spent: 0.5h (was: 20m)
> ContainerStateMachine is unable to increment lastAppliedTermIndex
> -----------------------------------------------------------------
>
> Key: HDDS-1766
> URL: https://issues.apache.org/jira/browse/HDDS-1766
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Components: Ozone Datanode
> Reporter: Lokesh Jain
> Assignee: Mukul Kumar Singh
> Priority: Blocker
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> ContainerStateMachine#updateLastApplied currently updates the
> lastAppliedTermIndex using applyTransactionCompletionMap. There are null
> entries in the applyTransactionCompletionMap causing the lastAppliedIndex to
> not be incremented.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]