You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Wei-Chiu Chuang (Jira)" <ji...@apache.org> on 2022/01/10 05:08:00 UTC
[jira] [Updated] (HDDS-6166) BlockInputStream unbuffer() should be synchronized
[ https://issues.apache.org/jira/browse/HDDS-6166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wei-Chiu Chuang updated HDDS-6166:
----------------------------------
Description:
{code:java}
@Override
public void unbuffer() {
storePosition();
releaseClient();
final List<ChunkInputStream> inputStreams = this.chunkStreams;
if (inputStreams != null) {
for (ChunkInputStream is : inputStreams) {
is.unbuffer();
}
}
} {code}
I believe the unbuffer() should be made synchronized to avoid potential data race in the future.
Example: S3AInputStream https://github.com/apache/hadoop/blob/c7ec1897c408257ea1f157123c0d1604b632c048/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AInputStream.java#L878-L889
cc: [~adoroszlai]
was:
{code:java}
@Override
public void unbuffer() {
storePosition();
releaseClient();
final List<ChunkInputStream> inputStreams = this.chunkStreams;
if (inputStreams != null) {
for (ChunkInputStream is : inputStreams) {
is.unbuffer();
}
}
} {code}
I believe the unbuffer() should be made synchronized to avoid potential data race in the future.
cc: [~adoroszlai]
> BlockInputStream unbuffer() should be synchronized
> --------------------------------------------------
>
> Key: HDDS-6166
> URL: https://issues.apache.org/jira/browse/HDDS-6166
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Client
> Affects Versions: 1.1.0
> Reporter: Wei-Chiu Chuang
> Priority: Major
>
> {code:java}
> @Override
> public void unbuffer() {
> storePosition();
> releaseClient();
> final List<ChunkInputStream> inputStreams = this.chunkStreams;
> if (inputStreams != null) {
> for (ChunkInputStream is : inputStreams) {
> is.unbuffer();
> }
> }
> } {code}
> I believe the unbuffer() should be made synchronized to avoid potential data race in the future.
> Example: S3AInputStream https://github.com/apache/hadoop/blob/c7ec1897c408257ea1f157123c0d1604b632c048/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AInputStream.java#L878-L889
> cc: [~adoroszlai]
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org