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: 設定が壊れる問題を修正 #1814

Merged
merged 1 commit into from
Feb 1, 2024
Merged

Conversation

sabonerune
Copy link
Contributor

内容

Discordで報告があった設定が同時に書き込まれる問題に(恐らく)対処します。

その他

恐らくsave()をawaitせずに呼び出したので保存完了前にlockを抜けていることが原因だと思います。

@sabonerune sabonerune requested a review from a team as a code owner January 31, 2024 22:39
@sabonerune sabonerune requested review from Hiroshiba and removed request for a team January 31, 2024 22:39
Copy link
Member

@sevenc-nanashi sevenc-nanashi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTMです。
一緒に、一時ファイル書いてそれを移動する感じで書き込むようにするのも入れていいかも?

@sabonerune
Copy link
Contributor Author

sabonerune commented Jan 31, 2024

一緒に、一時ファイル書いてそれを移動する感じで書き込むようにするのも入れていいかも?

fs.rename()がドライブを跨げない、失敗時の一時ファイルの処理を考えないとだから地味に面倒そう…

Copy link
Member

@Hiroshiba Hiroshiba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

なんか一時ファイルにしたあと書き込みができるnpmパッケージとかありそうですよね。

@Hiroshiba Hiroshiba merged commit 24a1b1b into VOICEVOX:main Feb 1, 2024
9 checks passed
@sabonerune sabonerune deleted the fix/save branch February 1, 2024 10:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants