[
https://issues.apache.org/jira/browse/HDDS-1798?focusedWorklogId=287586&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-287586
]
ASF GitHub Bot logged work on HDDS-1798:
----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Aug/19 10:13
Start Date: 02/Aug/19 10:13
Worklog Time Spent: 10m
Work Description: bshashikant commented on pull request #1113: HDDS-1798.
Propagate failure in writeStateMachineData to Ratis. Contributed by Supratim
Deka
URL: https://github.com/apache/hadoop/pull/1113#discussion_r310070112
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestContainerStateMachineFailures.java
##########
@@ -170,27 +173,19 @@ public void testContainerStateMachineFailures() throws
Exception {
HddsDispatcher dispatcher = (HddsDispatcher)
ozoneContainer.getDispatcher();
Assert.assertTrue(dispatcher.getMissingContainerSet().isEmpty());
- // restart the hdds datanode and see if the container is listed in the
- // in the missing container set and not in the regular set
+ // restart the hdds datanode, container should not in the regular set
cluster.restartHddsDatanode(0, true);
ozoneContainer = cluster.getHddsDatanodes().get(0)
.getDatanodeStateMachine().getContainer();
- dispatcher = (HddsDispatcher) ozoneContainer.getDispatcher();
-
Assert
.assertNull(ozoneContainer.getContainerSet().getContainer(containerID));
- Assert.assertTrue(dispatcher.getMissingContainerSet()
- .contains(containerID));
- ContainerProtos.ContainerCommandRequestProto.Builder request =
- ContainerProtos.ContainerCommandRequestProto.newBuilder();
- request.setCmdType(ContainerProtos.Type.CreateContainer);
- request.setContainerID(containerID);
- request.setCreateContainer(
- ContainerProtos.CreateContainerRequestProto.getDefaultInstance());
- request.setDatanodeUuid(
-
cluster.getHddsDatanodes().get(0).getDatanodeDetails().getUuidString());
- Assert.assertEquals(ContainerProtos.Result.CONTAINER_MISSING,
- dispatcher.dispatch(request.build(), null).getResult());
+
+ OzoneKeyDetails keyDetails = objectStore.getVolume(volumeName)
+ .getBucket(bucketName).getKey("ratis");
+ Assert.assertTrue("Data length stored in the key does not match writes.",
+ keyDetails.getDataSize() == written);
Review comment:
I think the msg on the test failure is confusing. The test will fail stating
length won't match written length. Can you please improve the msg here?
----------------------------------------------------------------
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: 287586)
Time Spent: 1h 10m (was: 1h)
> Propagate failure in writeStateMachineData to Ratis
> ---------------------------------------------------
>
> Key: HDDS-1798
> URL: https://issues.apache.org/jira/browse/HDDS-1798
> Project: Hadoop Distributed Data Store
> Issue Type: Sub-task
> Components: Ozone Datanode
> Reporter: Supratim Deka
> Assignee: Supratim Deka
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Currently,
> writeStateMachineData() returns a future to Ratis. This future does not track
> any errors or failures encountered as part of the operation - WriteChunk /
> handleWriteChunk(). The error is propagated back to the client in the form of
> an error code embedded inside writeChunkResponseProto. But the error goes
> undetected and unhandled in the Ratis server. The future handed back to Ratis
> is always completed with success.
> The goal is to detect any errors in writeStateMachineData in Ratis and treat
> is as a failure of the Ratis log. Handling for which is already implemented
> in HDDS-1603.
>
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]