Skip to content

Commit

Permalink
fix(tieredstorage): fix a dead cycle in TieredFileSegmentInputStream
Browse files Browse the repository at this point in the history
1. fix a dead cycle in TieredFileSegmentInputStream.java
2. remove unused JMH
related dependency

Closes apache#6624
  • Loading branch information
TheR1sing3un committed May 28, 2023
1 parent 9e514e9 commit 71812d5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
12 changes: 0 additions & 12 deletions tieredstore/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,5 @@
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-core</artifactId>
<version>1.35</version>
</dependency>
<dependency>
<groupId>org.openjdk.jmh</groupId>
<artifactId>jmh-generator-annprocess</artifactId>
<version>1.35</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public int read(byte[] b, int off, int len) {
needRead -= readLen;
pos += readLen;
posInCurBuffer += readLen;
if (posInCurBuffer == remaining) {
if (posInCurBuffer == curBuffer.remaining()) {
// read from next buf
bufIndex++;
posInCurBuffer = 0;
Expand Down

0 comments on commit 71812d5

Please sign in to comment.