hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mingliang Liu (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-13675) Bug in return value for delete() calls in WASB
Date Wed, 30 Nov 2016 21:26:58 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-13675?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15709826#comment-15709826
] 

Mingliang Liu commented on HADOOP-13675:
----------------------------------------

Thanks for updating the patch. The main change looks good to me.

# Can you include the tests against the live Azure Storage service, and state that you ran
all tests successfully before posting the patch?
# Can you explicitly write javadoc for the {{delete}} operation, especially the return value?
What does it mean by deleting successful? Changes have been made because of this delete call?
# In test {{TestNativeAzureFileSystemConcurrencyLive}}, the reason of potential failure is
lost. We can either log the encountered exception in child thread; or fail fast in the verification
code, as example:
{code}
    boolean deleteSuccess = false;
    for (int i = 0; i < threadCount; i++) {
      assertFalse("child thread has exception", helperThreads[i].getExceptionEncounteredFlag());
      if (deleteSuccess) {
        assertFalse("More than one thread delete() return true", helperThreads[i].getDeleteSuccess());
      } else {
        deleteSuccess = helperThreads[i].getDeleteSuccess();
      }
    }
{code}
replaces
{code}
47	    boolean deleteSuccess = false, testSuccess = true;
48	
49	    for (int i = 0; i < threadCount; i++) {
50	
51	      if (helperThreads[i].getExceptionEncounteredFlag()) {
52	        testSuccess = false;
53	        break;
54	      }
55	
56	      if (helperThreads[i].getDeleteSuccess()) {
57	        if (deleteSuccess) {
58	          testSuccess = false;
59	          break;
60	        } else {
61	          deleteSuccess = true;
62	        }
63	      }
64	    }
65	
66	    if (!deleteSuccess) {
67	      testSuccess = false;
68	    }
69	    assertTrue(testSuccess);
{code}

> Bug in return value for delete() calls in WASB
> ----------------------------------------------
>
>                 Key: HADOOP-13675
>                 URL: https://issues.apache.org/jira/browse/HADOOP-13675
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: azure, fs/azure
>    Affects Versions: 2.8.0
>            Reporter: Dushyanth
>            Assignee: Dushyanth
>             Fix For: 2.9.0
>
>         Attachments: HADOOP-13675.001.patch, HADOOP-13675.002.patch
>
>
> Current implementation of WASB does not correctly handle multiple threads/clients calling
delete on the same file. The expected behavior in such scenarios is only one of the thread
should delete the file and return true, while all other threads should receive false. However
in the current implementation even though only one thread deletes the file, multiple clients
incorrectly get "true" as the return from delete() call..



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org


Mime
View raw message