GH-55695: [GLib][Ruby] Close the opened file in gparquet_arrow_file_reader_close() #55703
All Vouch review confidence checks passed
Residual risk 0.13 = Change Risk (0.33) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 159 lines diff across 1 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.304
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #55703"
general
weight: 0.35
kou
Rationale for this change
gparquet_arrow_file_reader_new_path()andgparquet_arrow_file_reader_new_path_full()open the given path as a memory mapped file. Butgparquet_arrow_file_reader_close()doesn't close it becauseparquet::ParquetFileReader::Close()doesn't close its source. So the file is kept open until the reader is GC-ed. We can't remove the file on Windows while it's open. This is whyTestBooleanStatisticsin Red Parquet fails randomly on Windows: it depends onGC.startfreeing the reader.What changes are included in this PR?
gparquet_arrow_file_reader_close()closes the file opened by the reader now. The source passed togparquet_arrow_file_reader_new_arrow()andgparquet_arrow_file_reader_new_arrow_full()isn't closed because it's owned by the caller.Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.
Was AI used for this PR?
In accordance to the AI generation guidelines, please disclose below whether and how AI was used in this PR.
PR code and description written by:
Reviewed before submission by: