Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix bug of flip multi times #994

Merged
merged 3 commits into from
May 9, 2019
Merged

fix bug of flip multi times #994

merged 3 commits into from
May 9, 2019

Conversation

leizhiyuan
Copy link
Contributor

@leizhiyuan leizhiyuan commented May 8, 2019

Ⅰ. Describe what this PR did

Ⅱ. Does this pull request fix one issue?

when occurs exceptions, if will can not read data any more, because we flip twice.

 @Test
    public void test(){
        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(1024);
        byteBuffer.putInt(123);
        byteBuffer.flip();
        byteBuffer.flip();
        while (byteBuffer.hasRemaining()) {
            //
            System.out.println(byteBuffer.get());
        }
    }

Ⅲ. Why don't you add test cases (unit test/integration test)?

Ⅳ. Describe how to verify it

this test case will print nothing, only if you fix this bug

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented May 8, 2019

Codecov Report

Merging #994 into develop will decrease coverage by 0.06%.
The diff coverage is 60%.

Impacted file tree graph

@@              Coverage Diff              @@
##             develop     #994      +/-   ##
=============================================
- Coverage      38.44%   38.37%   -0.07%     
  Complexity      1046     1046              
=============================================
  Files            218      218              
  Lines           8681     8670      -11     
  Branches        1078     1080       +2     
=============================================
- Hits            3337     3327      -10     
+ Misses          4924     4923       -1     
  Partials         420      420
Impacted Files Coverage Δ Complexity Δ
...eata/server/store/FileTransactionStoreManager.java 41.75% <100%> (ø) 19 <2> (ø) ⬇️
...io/seata/server/store/TransactionStoreManager.java 86.66% <50%> (-1.8%) 0 <0> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bd0177d...df56ef5. Read the comment docs.

Copy link
Contributor

@CoffeeLatte007 CoffeeLatte007 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@slievrly slievrly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lovepoem lovepoem merged commit 6370807 into apache:develop May 9, 2019
nick-tan pushed a commit to nick-tan/seata that referenced this pull request Jul 12, 2019
* fix bug of flip multi times

* reform enum getByCode
@wangliang181230 wangliang181230 added this to the 0.5.* milestone Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants