You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "huyuanfeng2018 (via GitHub)" <gi...@apache.org> on 2023/05/24 12:38:48 UTC

[GitHub] [iceberg] huyuanfeng2018 opened a new pull request, #7696: Parquet: Fix possible stream duplicate close issue when using DelegateingOutputStream

huyuanfeng2018 opened a new pull request, #7696:
URL: https://github.com/apache/iceberg/pull/7696

   When I used Flink to write to the iceberg table, I made a layer of encapsulation for the outputStream, which will eventually be converted into a HadoopPositionOutputStream object. It implements DelegatingOutputStream, and the HadoopPositionOutputStream object rewrites the finalize method. This method will try to close the stream, but there will be problems in parquetIO:
   
   ```
     static PositionOutputStream stream(org.apache.iceberg.io.PositionOutputStream stream) {
       if (stream instanceof DelegatingOutputStream) {
         OutputStream wrapped = ((DelegatingOutputStream) stream).getDelegate();
         if (wrapped instanceof FSDataOutputStream) {
           return HadoopStreams.wrap((FSDataOutputStream) wrapped);
         }
       }
       return new ParquetOutputStreamAdapter(stream);
     }
   ```
   Here, the Delegate will be taken out and repackaged, and the HadoopPositionOutputStream object will be discarded. At this time, the HadoopPositionOutputStream object may not be continuously referenced, and may be recycled during gc. If gc is triggered to recycle the HadoopPositionOutputStream object during the stream writing process, close will be called at this time. The method closes the stream, causing file corruption.
   
   This pr is used to solve this problem. Add takeDelegate to DelegatingOutputStream to take the Delegate out and set it to null to prevent finalize close
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Parquet: Fix possible stream duplicate close issue when using DelegateingOutputStream [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7696:
URL: https://github.com/apache/iceberg/pull/7696#issuecomment-2334958879

   This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Parquet: Fix possible stream duplicate close issue when using DelegateingOutputStream [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed pull request #7696: Parquet: Fix possible stream duplicate close issue when using DelegateingOutputStream
URL: https://github.com/apache/iceberg/pull/7696


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


Re: [PR] Parquet: Fix possible stream duplicate close issue when using DelegateingOutputStream [iceberg]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #7696:
URL: https://github.com/apache/iceberg/pull/7696#issuecomment-2319519068

   This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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