You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@distributedlog.apache.org by "Sijie Guo (JIRA)" <ji...@apache.org> on 2017/01/07 00:30:58 UTC

[jira] [Resolved] (DL-171) TestAppendOnlyStreamWriter#testPositionUpdatesOnlyAfterWriteCompletionWithoutFsync failed occasionally

     [ https://issues.apache.org/jira/browse/DL-171?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sijie Guo resolved DL-171.
--------------------------
       Resolution: Fixed
    Fix Version/s: 0.4.0

Issue resolved by merging pull request 98
      [https://github.com/apache/incubator-distributedlog/pull/98]

      {noformat}
      commit 859b342b25dcac3cf4c2353c2d2ff4994d4bcaba
Author:     xieliang <xi...@gmail.com>
AuthorDate: Fri Jan 6 16:30:32 2017 -0800
Commit:     Sijie Guo <si...@twitter.com>
CommitDate: Fri Jan 6 16:30:32 2017 -0800

    DL-171: adding a short sleep to let the WriteCompleteListener have time to run before the final position be requested
    
    once the "writer.write" is done, if "writer.position()" be invoked easier than the WriteCompleteListener onSuccess callback, due to the "synchronized", the position result will be 0, not the expected 33. we can just add a short sleep to avoid this test issue.
    
    Author: xieliang <xi...@gmail.com>
    
    Reviewers: Sijie Guo <si...@apache.org>
    
    Closes #98 from xieliang/DL-171-Fix-TestAppendOnlyStreamWriter

      {noformat}
      

> TestAppendOnlyStreamWriter#testPositionUpdatesOnlyAfterWriteCompletionWithoutFsync failed occasionally
> ------------------------------------------------------------------------------------------------------
>
>                 Key: DL-171
>                 URL: https://issues.apache.org/jira/browse/DL-171
>             Project: DistributedLog
>          Issue Type: Bug
>          Components: tests
>    Affects Versions: 0.4.0
>            Reporter: Liang Xie
>            Assignee: Liang Xie
>             Fix For: 0.4.0
>
>
> I had seen several failed running, i.g. the latest one: https://builds.apache.org/job/distributedlog-precommit-pullrequest/68/com.twitter$distributedlog-core/testReport/com.twitter.distributedlog/TestAppendOnlyStreamWriter/testPositionUpdatesOnlyAfterWriteCompletionWithoutFsync/
> I can reproduce it after several runnings locally, after diving into the detail, it turn out that an execution sequence issue: once the "writer.write" be done, if "writer.position()" be invoked easier than the WriteCompleteListener onSuccess callback,  due to the "synchronized", the position result will be 0, not the expected 33. we can just add a short sleep to avoid this test issue.



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