Skip to content
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) Flush output stream before calling fd.sync, #480 #481

Merged
merged 5 commits into from
Jul 8, 2020

Conversation

killme2008
Copy link
Contributor

Motivation:

#480

Modification:

Flush output stream before calling FileDescriptor#sync in ProtoBufFile.save method. I also checked other code that do this stuff, they looks fine.

Result:

Fixes #480 .

It's a fatal issue, we should release a new version ASAP.

@sofastack-bot sofastack-bot bot added bug Something isn't working cla:yes size/XS labels Jul 5, 2020
@killme2008 killme2008 requested a review from fengjiachun July 5, 2020 00:41
@killme2008 killme2008 added bug Something isn't working and removed bug Something isn't working labels Jul 5, 2020
@sofastack-bot sofastack-bot bot added size/M and removed size/XS labels Jul 6, 2020
@killme2008
Copy link
Contributor Author

@fengjiachun @zongtanghu 这个有空抓紧看下,需要发一个版本

@fengjiachun
Copy link
Contributor

@fengjiachun @zongtanghu 这个有空抓紧看下,需要发一个版本

需要整理下代码缩进

@killme2008
Copy link
Contributor Author

@fengjiachun 用了格式化命令了,会乱

@zongtanghu
Copy link
Contributor

zongtanghu commented Jul 7, 2020

Maybe, it will be better that adding some unit test case? @killme2008

@killme2008
Copy link
Contributor Author

@zongtanghu It's hard to test this case in unit test, because we can't mock system crash in java simply. I think we should verify it in chaos test.

@zongtanghu
Copy link
Contributor

@zongtanghu It's hard to test this case in unit test, because we can't mock system crash in java simply. I think we should verify it in chaos test.

@killme2008 ok, it's nice!

@killme2008
Copy link
Contributor Author

@fengjiachun It can be merged.

@fengjiachun fengjiachun merged commit 8dc7729 into master Jul 8, 2020
@fengjiachun fengjiachun deleted the feature/fix-sync branch July 8, 2020 02:31
@fengjiachun fengjiachun mentioned this pull request Jul 10, 2020
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cla:yes size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Snapshot metadata lost after node panic back.
3 participants