tustvold commented on code in PR #4157:
URL: https://github.com/apache/arrow-rs/pull/4157#discussion_r1180704302


##########
parquet/src/util/io.rs:
##########
@@ -89,9 +89,8 @@ impl<R: ParquetReader> FileSource<R> {
             // Branch using `>=` instead of the more correct `==`
             // to tell the compiler that the pos..cap slice is always valid.
             debug_assert!(self.buf_pos == self.buf_cap);
-            let mut reader = self.reader.borrow_mut();
-            reader.seek(SeekFrom::Start(self.start))?; // always seek to start 
before reading
-            self.buf_cap = reader.read(&mut self.buf)?;
+            self.reader.seek(SeekFrom::Start(self.start))?; // always seek to 
start before reading

Review Comment:
   This is technically still racy because cloned file descriptor share a seek 
position, but the refcell wasn't helping prevent this



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to