-
Notifications
You must be signed in to change notification settings - Fork 950
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
fix: keep meta data complete #2292
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2292 +/- ##
==========================================
- Coverage 66.8% 66.74% -0.06%
==========================================
Files 208 208
Lines 16971 16974 +3
==========================================
- Hits 11337 11330 -7
- Misses 4270 4275 +5
- Partials 1364 1369 +5
|
Is there any possibility that before backuping the original |
it will return error, then, meta data update also fails.
And if the container is first time to be created, the created process will fail, since disk is full. |
before update meta.json on disk, write a new file for the new content, in case that if fails to write new file(like no space on disk), we can still have a completed file. Avoid meta.json broken, in this way, we may hardly recover meta data Signed-off-by: Ace-Tang <aceapril@126.com>
@allencloud , modify as you suggest offline, PTAL. |
I think you should adjust the content of pr according to your recently changes. These changes don't backup the original configuration but create a new target file and replace the origin. |
@xiaoxubeii , I have alreay update content of pr, but just not update the auto-generated one, now I update it. |
LGTM, while I would invite @fuweid to take another review. |
LGTM |
before updating meta.json on disk, write a new file for the new content, in case
that if it fails to write new file(like no space on disk), we can still
have a completed file. Avoid meta.json broken, in this way, we may
hardly recover meta data
Signed-off-by: Ace-Tang aceapril@126.com
Ⅰ. Describe what this PR did
The design
Design has changed according to the review, please check.
Ⅱ. Does this pull request fix one issue?
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
no.
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews