[SERVER-30583] Only call os.fsync if -o option is not default value in collect_resource_info.py Created: 09/Aug/17 Updated: 30/Oct/23 Resolved: 28/Aug/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Testing Infrastructure |
| Affects Version/s: | None |
| Fix Version/s: | 3.5.13 |
| Type: | Bug | Priority: | Trivial - P5 |
| Reporter: | Eddie Louie | Assignee: | Eddie Louie |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | TIG 2017-09-11 | ||||
| Participants: | |||||
| Description |
|
If we use the stdout as the output stream, a call to os.fsync(fp.fileno()) will fail.
Need to conditionally call os.fsync if options.output != '-' or potentially remove this call altogether since we already have line_buffered set. Will have to test. |
| Comments |
| Comment by Githook User [ 28/Aug/17 ] | |||
|
Author: {'username': 'elouie99', 'name': 'Eddie Louie', 'email': 'eddie.louie@mongodb.com'}Message: | |||
| Comment by Max Hirschhorn [ 16/Aug/17 ] | |||
|
I think it's fine to keep the fsync() call so that the contents of the file even if the background thread gets killed by the Evergreen agent. I would just conditionalize the fsync() call on whether we're writing to stdout.
|