-
Notifications
You must be signed in to change notification settings - Fork 589
Make BufferedReader usable on all platforms to support read of append_vec always through File #6876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6876 +/- ##
=========================================
- Coverage 83.3% 83.3% -0.1%
=========================================
Files 853 853
Lines 378508 378511 +3
=========================================
- Hits 315482 315471 -11
- Misses 63026 63040 +14 🚀 New features to boost your workflow:
|
I dunno... I don't think we should add any support for Windows for anything IMO. We don't actually support running a real validator on Windows, so adding code that requires support and testing doesn't seem like a great idea. |
This unifies the codebase and I was hoping to make this code an actual fallback for an even more linux-specific io_uring implementation of buffered reader. Also I'm wondering it it would be possible to remove more code if this supports windows - e.g. mmap append vec is serving as fallback for not becing able to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding @cpubot as a reviewer, since he's touched a lot of this code recently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great
Problem
BufferedReader
is excluded from use on non-unix becauseread_at
is aos::unix
API, however there is similar API also available on windows, so we could extend its usage.Summary of Changes
Narrow down platform-specific function call to read at offset and provide unix and windows implementation of it.
Notes:
BufferedReader
universally available and catch any other platform at compile time