should remove targetFile when targetFile is existing?
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, node.js
- 領域
- backend
調査の方向性
まず、fs.move(sourceFilePath, targetFilePath, { overwrite: true })を呼び出すロールオーバーパスを追跡し、disableClustering: true のマルチプロセスケースを再現します。targetFilePath がすでに存在する場合の動作を確認します。完了の条件は、同時実行されるロールオーバーによって更新されたログが上書きされたり、ログが失われたりしなくなることです。
索引モデルが issue の本文から書いたものです。
説明
when the current file should roll,the operation is
fs.move(sourceFilePath, targetFilePath, { overwrite: true });
this will delete target file if it exist.
But, in the mutli process app,when set disableClustering: true, all process will do the same operation. The first write log process will rename log.log to log.log.2020-01-01-01 and renew log.log. The next write log process will rename log.log that is renewed by first process to log.log.2020-01-01-01 too and this cause log loss.
So, when target file exists, should skip remove operation?
try {
if (fs.existsSync(targetFilePath)) {
return ;
}
await fs.move(sourceFilePath, targetFilePath, { overwrite: true });
} catch (e) { }
- 主要言語
- JavaScript
- スター
- 38
- フォーク
- 20
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
log4js-node/streamroller のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
log4js-node/streamroller#176 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
log4js-node/streamroller#175 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
log4js-node/streamroller#173 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 15/100
log4js-node/streamroller#171 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
log4js-node/streamroller#163 · コメント 3 件 ·
log4js-node/streamroller の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
jfromaniello/url-join#134 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
quarto-dev/quarto-cli#15042 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
extendr/extendr.github.io#134 ·