Follow temporary file + rename pattern for all files
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- c
- Domain
- embedded-iot
Research direction
Start by reviewing the existing special-case temporary-file and rename handling described in this issue and the discussion on issue #131. Identify every file-update path affected, then verify that all updates follow the temporary-file pattern without exposing partial or clobbered files.
Written by the indexing model from the issue text.
Description
Checklist (Please check before submitting)
- I reviewed the Contributing Guide.
- I reviewed the CF README.md file to see if the feature is in the major future work.
- I performed a cursory search to see if the feature request is relevant, not redundant, nor in conflict with other tickets.
Is your feature request related to a problem? Please describe.
Currently, there is a special case to handle situations where the MD PDU arrives out of order. A temporary file is opened, and then renamed once the MD packet does arrive.
However, because this is only done for off-nominal cases, it is likely not as well tested as other paths (see bug #131).
Describe the solution you'd like
This pattern of using a temp file should be standard operating procedure, not just something for special cases. Reasons/advantages for always doing it this way described in my comment here: https://github.com/nasa/CF/issues/131#issuecomment-1183239857
This improves atomicity of file updates, prevents clobbering files and avoids cases where other apps might see partial files or other bad content.
Describe alternatives you've considered
N/A
Additional context
As the fix for #131 strictly only fixed the issue described, this is a more general enhancement that would improve CF.
Requester Info
Joseph Hickey, Vantage Systems, Inc.
- Dominant language
- C
- Stars
- 123
- Forks
- 82
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 2
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nasa/CF
-
CF_CFDP_S_SendFileData computes the file checksum from the SB buffer after CFE_SB_TransmitBufferOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Assert checks non-existent variable (`pt`) in `CF_CFDP_ProcessPlaybackDirectory()`May be free again A pull request for this issue was closed without being merged. Openinvalid
Difficulty 1/5 Under an hour Newbie friendliness 68/100
Similar issues
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
389ds/389-ds-base#8251 ·
Maintainers usually reply within 1 day
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
ClickHouse/clickhouse-cpp#645 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
ROCm/hrx-system#3628 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
OpenPrinting/cups#1844 ·
Maintainers usually reply within 1 day