taiyang-li commented on code in PR #2048:
URL: https://github.com/apache/orc/pull/2048#discussion_r1859716199


##########
c++/src/Reader.hh:
##########
@@ -260,6 +268,13 @@ namespace orc {
     // footer
     proto::Footer* footer_;
     uint64_t numberOfStripes_;
+
+    // cached io ranges. only valid when preBuffer is invoked.
+    std::shared_ptr<ReadRangeCache> readCache_;
+
+    // mutex to protect readCache_ from concurrent access
+    std::mutex readCacheMutex_;

Review Comment:
   I think this is the proper place of mutex. Because the mutex could not only 
protect the interfaces of `ReadRangeCache`, but also the creation of 
`ReadRangeCache`



-- 
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