skywalking
skywalking copied to clipboard
[Feature] Add LOCK and VERSION Files for Process Control and Compatibilit
Search before asking
- [X] I had searched in the issues and found no similar feature requirement.
Description
I would like to propose a new feature to enhance the reliability and compatibility of our project.
Problem Statement
Currently, there is no mechanism to prevent multiple processes from opening the Stream and Measure directories simultaneously. This could potentially cause conflicts and data corruption.
Additionally, we do not have a way to identify the version of the files contained within these directories. This limits our ability to implement backward compatibility in BanyanDB, as we cannot accurately determine the version of the files and apply the appropriate handling logic.
Proposed solution
-
Add a LOCK file to the Stream and Measure directories: This file will serve as a lock, preventing multiple processes from accessing the directories simultaneously. When a process starts, it should check for the presence of the LOCK file and, if it exists, either wait or terminate. When a process ends, it should remove the LOCK file.
-
Add a VERSION file to the Stream and Measure directories: This file will contain the version number of the files within the directory. This will allow BanyanDB to identify the file version and apply the correct backward compatibility logic.
Implementing these two features will enhance the reliability of our project by preventing potential conflicts and data corruption, and will also enable us to effectively implement backward compatibility in BanyanDB.
Use case
No response
Related issues
No response
Are you willing to submit a pull request to implement this on your own?
- [ ] Yes I am willing to submit a pull request on my own!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I'd like to contribute. Please assign it to me, thanks!