apache / apache/ozhera

Optimize log-stream module: Add request data comparison and remove lock usage

Open
#543 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
122
Forks
46
Avg merge
11h 56m
Merged PRs (30d)
9

Description

This PR primarily focuses on the following optimizations to the `log-stream` module:

1. **Optimized Logging Process**:
Improved the processing logic of log data to reduce unnecessary computations and processing steps.
Added comparison logic to detect changes in data within the request.

2. **Data Change Comparison**:
During the processing of log requests, added logic to compare the data before and after the request.
If the data remains unchanged throughout the request, the processing flow is terminated immediately, eliminating the need for subsequent operations.

3. **Removal of Lock Usage**:
Due to the addition of data change comparison logic, which ensures that no write operations are performed when data is unchanged, the previously used lock mechanism to prevent data races has been removed.
This not only simplifies the code logic but also improves processing performance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.