Conversation
- Remove installation of deepin-anything-server.service to fix installation failure of deb package. - Enhance get_config_int64 function to support both int64 and double types. - Update CMakeLists.txt file to include Boost and Threads dependencies to fix linking issues. - Refactor time format in file_index_manager to fix compilation issues. - Add errno header in tools.c to fix compilation issues. Log: Adapt to V20
The current index submission logic is: - When an event comes in, the dirty state will be set. - When a large number of events come in, they will be immediately put into the thread pool for processing. - The timer thread will process the currently unprocessed events and commit the index if the index commit timeout is reached. Problem scenarios: - When the thread pool size is 1 and a large number of events are pouring in, a large number of events will be put into the thread pool for processing. - The last batch of events arrives, and then the timer thread starts running and processes the last batch of events and commit the index. - If the thread pool is still processing events at this time, the subsequent batch of events will not be saved in the committed index, and can only be saved when the index is committed next time. The solution is to commit the index and meet three conditions: - timeout reached - no unprocessed events - the thread pool has processed the events Log: Fix index updates not saved after a timeout
Reviewer's GuideThis PR enhances configuration value parsing to handle both int64 and double types, refactors timestamp generation using GLib’s GDateTime API, adds thread and Boost dependencies to the searcher build, adds thread-pool busy guards to index commit logic, and adjusts packaging scripts for the systemd service. Class diagram for updated config value parsing in config.cppclassDiagram
class Config {
+get_config_int64(connection, resource_path, key)
}
class GVariant
Config --|> GVariant : uses
%% get_config_int64 now handles both int64 and double types
%% and logs error for invalid types
Class diagram for file_index_manager timestamp refactorclassDiagram
class file_index_manager {
+save_index_status(index_status status)
}
class GDateTime
file_index_manager --|> GDateTime : uses
%% save_index_status now uses GDateTime for timestamp generation
Class diagram for base_event_handler index commit logic updateclassDiagram
class base_event_handler {
+timer_worker(int64_t interval)
-commit_volatile_index_timeout_
-commit_persistent_index_timeout_
-jobs_
-pool_
-index_manager_
-index_status_
-volatile_index_dirty_
-config_
}
class pool {
+busy()
}
base_event_handler --> pool : checks busy()
%% timer_worker now checks pool_.busy() before committing indexes
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
TAG Bot TAG: 7.0.22 |
Fix reuse lint failures. Log: Update version to 7.0.22
deepin pr auto review代码审查意见:
以上是针对代码提交的审查意见,希望能够帮助到您。 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lzwind, wangrong1069 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/merge |
|
/topic cd-20250627 |
|
/integr-topic cd-20250627 |
|
Add topic: cd-20250627 successed. |
|
Integrated with pr deepin-community/Repository-Integration#2959 |
Summary by Sourcery
Enhance configuration parsing, timestamp formatting, and index commit logic; update build dependencies and packaging scripts accordingly.
Enhancements:
Build:
Chores: