You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
centos8
local ssd
RocketMQ version
5.1.4
JDK Version
1.8
Describe the Bug
The configured directories are:
/data, /data2, /data3, /data4.
After a long period of pressure testing, we found that in different directories, there are commitlog files with the same name. One of these commitlog files appears to be empty, but the filenames are identical. Is this a bug, and is there any risk associated with it?
If the process restarts, and duplicate commitlog files are loaded, could this also pose a risk?
As for code analysis, we're unsure if it's correct:
In MultiPathMappedFileQueue.java, this file is used for creating files across multiple paths. In the tryCreateMappedFile implementation, paths where the disk usage is high (85%) will be filtered out, and new commitlog files will not be created in those paths.
However, it is possible that during a previous create map file operation, the path was already added to nextNextFilePath for pre-creation. If the paths change in the next cycle, a new commitlog will be created in a different path as the actual commitlog, while the previously pre-created file will be unused and essentially a "fake" file.
Steps to Reproduce
set storePathCommitLog=/data,/data1,/data2,/data3
and just continue produce
What Did You Expect to See?
commitlog will not be the same name
What Did You See Instead?
none
Additional Context
No response
The text was updated successfully, but these errors were encountered:
domyway
changed the title
[Bug] Bug title
[Bug] commitlog in diffrent dir are the same name when set multiple dir(storePathCommitLog)
Oct 23, 2024
domyway
changed the title
[Bug] commitlog in diffrent dir are the same name when set multiple dir(storePathCommitLog)
[Bug] commitlogs in diffrent dir are the same name when set multiple dir(storePathCommitLog)
Oct 23, 2024
I did some testing locally and it turns out that this issue can cause written messages to not be consumed.
In my case, i create duplicate commit log file 00000000000000001024 in different path as follows :
When MappedFileQueue initializing, these four files (including duplicate files) will be loaded into mappedFiles, and a self-check error ERROR log will be printed in the checkSelf function.
What's more serious is that when using offset to find MappedFile, the first MappedFile will be returned. If this file is one of the empty files, it means that there is no message here, or it will cause a more serious system exception.
I haven't done more testing, so I'm not sure if this bug only affects consumption, but I think this issue has a big impact on system stability.
Before Creating the Bug Report
I found a bug, not just asking a question, which should be created in GitHub Discussions.
I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.
I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.
Runtime platform environment
centos8
local ssd
RocketMQ version
5.1.4
JDK Version
1.8
Describe the Bug
The configured directories are:
/data, /data2, /data3, /data4.
After a long period of pressure testing, we found that in different directories, there are commitlog files with the same name. One of these commitlog files appears to be empty, but the filenames are identical. Is this a bug, and is there any risk associated with it?
If the process restarts, and duplicate commitlog files are loaded, could this also pose a risk?
As for code analysis, we're unsure if it's correct:
In MultiPathMappedFileQueue.java, this file is used for creating files across multiple paths. In the tryCreateMappedFile implementation, paths where the disk usage is high (85%) will be filtered out, and new commitlog files will not be created in those paths.
However, it is possible that during a previous create map file operation, the path was already added to nextNextFilePath for pre-creation. If the paths change in the next cycle, a new commitlog will be created in a different path as the actual commitlog, while the previously pre-created file will be unused and essentially a "fake" file.
Steps to Reproduce
set storePathCommitLog=/data,/data1,/data2,/data3
and just continue produce
What Did You Expect to See?
commitlog will not be the same name
What Did You See Instead?
none
Additional Context
No response
The text was updated successfully, but these errors were encountered: