You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Tsz-wo Sze (Jira)" <ji...@apache.org> on 2023/02/24 21:03:00 UTC

[jira] [Commented] (HDDS-8024) Intermittent inconsistent read in HSync tests

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

Tsz-wo Sze commented on HDDS-8024:
----------------------------------

[~adoroszlai], thanks for filing this bug.

bq. KeyInputStream.checkPartBytesRead(KeyInputStream.java:175)

The check seems incorrect.  We cannot expect numBytesToRead == numBytesRead.  For example, https://docs.oracle.com/javase/8/docs/api/java/io/DataInputStream.html#read-byte:A-int-int- returns the total number of bytes read (numBytesRead) into the buffer, or -1.  It is not necessarily the len (numBytesToRead) given in the parameter.

> Intermittent inconsistent read in HSync tests
> ---------------------------------------------
>
>                 Key: HDDS-8024
>                 URL: https://issues.apache.org/jira/browse/HDDS-8024
>             Project: Apache Ozone
>          Issue Type: Sub-task
>    Affects Versions: 1.4.0
>            Reporter: Attila Doroszlai
>            Priority: Major
>
> {code:title=https://github.com/adoroszlai/ozone-build-results/blob/master/2023/02/03/19930/it-filesystem/hadoop-ozone/integration-test/org.apache.hadoop.fs.ozone.contract.ITestOzoneContractCreate.txt}
> ITestOzoneContractCreate.testSyncable  Time elapsed: 0.309 s  <<< ERROR!
> java.io.IOException: Inconsistent read for blockID=conID: 1 locID: 111677748019200007 bcsId: 0 length=2 position=1 numBytesToRead=1 numBytesRead=-1
> 	at org.apache.hadoop.ozone.client.io.KeyInputStream.checkPartBytesRead(KeyInputStream.java:175)
> 	at org.apache.hadoop.hdds.scm.storage.MultipartInputStream.readWithStrategy(MultipartInputStream.java:97)
> 	at org.apache.hadoop.hdds.scm.storage.ExtendedInputStream.read(ExtendedInputStream.java:54)
> 	at org.apache.hadoop.hdds.scm.storage.ExtendedInputStream.read(ExtendedInputStream.java:41)
> 	at org.apache.hadoop.fs.ozone.OzoneFSInputStream.read(OzoneFSInputStream.java:55)
> 	at java.io.FilterInputStream.read(FilterInputStream.java:83)
> 	at org.apache.hadoop.fs.contract.AbstractContractCreateTest.validateSyncableSemantics(AbstractContractCreateTest.java:548)
> 	at org.apache.hadoop.fs.contract.AbstractContractCreateTest.testSyncable(AbstractContractCreateTest.java:459)
> {code}
> {code:title=https://github.com/adoroszlai/hadoop-ozone/actions/runs/4257319915/jobs/7407314181#step:5:3310}
> java.io.IOException: Inconsistent read for blockID=conID: 1 locID: 111677748019200001 bcsId: 0 length=1120 position=97 numBytesToRead=1023 numBytesRead=-1
> 	at org.apache.hadoop.ozone.client.io.KeyInputStream.checkPartBytesRead(KeyInputStream.java:175)
> 	at org.apache.hadoop.hdds.scm.storage.MultipartInputStream.readWithStrategy(MultipartInputStream.java:97)
> 	at org.apache.hadoop.hdds.scm.storage.ExtendedInputStream.read(ExtendedInputStream.java:54)
> 	at org.apache.hadoop.fs.ozone.OzoneFSInputStream.read(OzoneFSInputStream.java:64)
> 	at java.io.DataInputStream.read(DataInputStream.java:149)
> 	at org.apache.hadoop.fs.ozone.TestHSync.runTestHSync(TestHSync.java:188)
> 	at org.apache.hadoop.fs.ozone.TestHSync.runTestHSync(TestHSync.java:143)
> 	at org.apache.hadoop.fs.ozone.TestHSync.testO3fsHSync(TestHSync.java:116)
> {code}
> I guess these two different tests both exercise HSync.
> CC [~weichiu], [~szetszwo]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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