should remove targetFile when targetFile is existing?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- javascript, node.js
- Domain
- backend
Research direction
Start by tracing the rollover path that calls fs.move(sourceFilePath, targetFilePath, { overwrite: true }) and reproduce the disableClustering: true multi-process case. Confirm the behavior when targetFilePath already exists; done means concurrent rollovers no longer overwrite the renewed log or cause log loss.
Written by the indexing model from the issue text.
Description
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) { }
- Dominant language
- JavaScript
- Stars
- 38
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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 log4js-node/streamroller
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
log4js-node/streamroller#176 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
log4js-node/streamroller#175 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
log4js-node/streamroller#173 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 15/100
log4js-node/streamroller#171 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
log4js-node/streamroller#163 · 3 comments ·
All issues in log4js-node/streamroller
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·