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
When running WPWatcher with multiple instances or scheduled scans, there is a risk of data corruption and failures due to concurrent access to the JSON report database file. This issue impacts users who have multiple scans running at the same time or who use a combination of cron jobs and the Linux service.
Proposed Solution
To address these concurrency issues, I propose migrating from JSON file storage to SQLite for storing scan reports. SQLite provides built-in support for concurrent access and ensures data consistency even when multiple processes access the database simultaneously. By using SQLite, WPWatcher can run multiple instances without the risk of data corruption due to concurrent access.
Update the DataBase class to use SQLite instead of a JSON file.
Create a table named reports in the SQLite database to store report data.
Modify the write and find methods to work with the SQLite database.
Ensure the updated implementation maintains backward compatibility with existing configurations and usage.
Test the updated implementation with multiple instances of WPWatcher running concurrently to confirm that the concurrency issues are resolved.
Benefit
By implementing SQLite for report storage, WPWatcher will be able to handle multiple instances and concurrent scans without the risk of data corruption or failures. This change will greatly enhance the reliability and robustness of the tool for users who need to perform frequent or overlapping scans.
The text was updated successfully, but these errors were encountered:
Description
When running WPWatcher with multiple instances or scheduled scans, there is a risk of data corruption and failures due to concurrent access to the JSON report database file. This issue impacts users who have multiple scans running at the same time or who use a combination of cron jobs and the Linux service.
Proposed Solution
To address these concurrency issues, I propose migrating from JSON file storage to SQLite for storing scan reports. SQLite provides built-in support for concurrent access and ensures data consistency even when multiple processes access the database simultaneously. By using SQLite, WPWatcher can run multiple instances without the risk of data corruption due to concurrent access.
DataBase
class to use SQLite instead of a JSON file.reports
in the SQLite database to store report data.write
andfind
methods to work with the SQLite database.Benefit
By implementing SQLite for report storage, WPWatcher will be able to handle multiple instances and concurrent scans without the risk of data corruption or failures. This change will greatly enhance the reliability and robustness of the tool for users who need to perform frequent or overlapping scans.
The text was updated successfully, but these errors were encountered: