-
Notifications
You must be signed in to change notification settings - Fork 3.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Fix](Job)Replace BlockingWaitStrategy with LiteTimeoutBlockingWaitStrategy to avoid deadlock issues. #40625
Conversation
…rategy to avoid deadlock issues. Timeout Handling: LiteTimeoutBlockingWaitStrategy provides a timeout for waiting threads. If the buffer is not ready within the timeout period, the thread is released, preventing it from being blocked indefinitely. Reduced Risk of Deadlocks: By avoiding indefinite blocking, this strategy reduces the risk of deadlocks caused by threads waiting on each other. The timeout allows the system to handle scenarios where resources are temporarily
…rategy to avoid deadlock issues. Timeout Handling: LiteTimeoutBlockingWaitStrategy provides a timeout for waiting threads. If the buffer is not ready within the timeout period, the thread is released, preventing it from being blocked indefinitely. Reduced Risk of Deadlocks: By avoiding indefinite blocking, this strategy reduces the risk of deadlocks caused by threads waiting on each other. The timeout allows the system to handle scenarios where resources are temporarily
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
fe/fe-core/src/main/java/org/apache/doris/job/disruptor/TaskDisruptor.java
Outdated
Show resolved
Hide resolved
fe/fe-core/src/main/java/org/apache/doris/job/executor/TimerJobSchedulerTask.java
Outdated
Show resolved
Hide resolved
run buildall |
TPC-H: Total hot run time: 38769 ms
|
TPC-DS: Total hot run time: 194845 ms
|
ClickBench: Total hot run time: 31.71 s
|
…ror management. Path Normalization: Added normalize() to standardize the input path, removing redundant elements to enhance security and consistency. Path Separator Handling: Addressed Windows path separators by converting them to Unix style to ensure consistent URL formatting. URL Encoding: Implemented URL encoding for the path to safely handle special characters and avoid issues in the URL format. Exception Handling: Added general exception handling with a default return value to maintain system stability in case of errors.
run buildall |
TPC-H: Total hot run time: 38689 ms
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
PR approved by at least one committer and no changes requested. |
PR approved by anyone and no changes requested. |
…rategy to avoid deadlock issues. (apache#40625) FYI https://issues.apache.org/jira/browse/LOG4J2-1221 - BlockingWaitStrategy is a wait strategy used in the Disruptor framework that blocks the thread when the ring buffer is full or not yet available for publishing. When threads are blocked, they are waiting for space in the ring buffer to become available, which can lead to potential deadlocks if not managed properly. Timeout Handling: - LiteTimeoutBlockingWaitStrategy provides a timeout for waiting threads. If the buffer is not ready within the timeout period, the thread is released, preventing it from being blocked indefinitely. Reduced Risk of Deadlocks: - By avoiding indefinite blocking, this strategy reduces the risk of deadlocks caused by threads waiting on each other. The timeout allows the system to handle scenarios where resources are temporarily (cherry picked from commit 087048f)
…rategy to avoid deadlock issues. (#40625) FYI https://issues.apache.org/jira/browse/LOG4J2-1221 - BlockingWaitStrategy is a wait strategy used in the Disruptor framework that blocks the thread when the ring buffer is full or not yet available for publishing. When threads are blocked, they are waiting for space in the ring buffer to become available, which can lead to potential deadlocks if not managed properly. Timeout Handling: - LiteTimeoutBlockingWaitStrategy provides a timeout for waiting threads. If the buffer is not ready within the timeout period, the thread is released, preventing it from being blocked indefinitely. Reduced Risk of Deadlocks: - By avoiding indefinite blocking, this strategy reduces the risk of deadlocks caused by threads waiting on each other. The timeout allows the system to handle scenarios where resources are temporarily
…ockingWaitStrategy to avoid deadlock issues. (#40625) (#40707) … FYI https://issues.apache.org/jira/browse/LOG4J2-1221 - BlockingWaitStrategy is a wait strategy used in the Disruptor framework that blocks the thread when the ring buffer is full or not yet available for publishing. When threads are blocked, they are waiting for space in the ring buffer to become available, which can lead to potential deadlocks if not managed properly. Timeout Handling: - LiteTimeoutBlockingWaitStrategy provides a timeout for waiting threads. If the buffer is not ready within the timeout period, the thread is released, preventing it from being blocked indefinitely. Reduced Risk of Deadlocks: - By avoiding indefinite blocking, this strategy reduces the risk of deadlocks caused by threads waiting on each other. The timeout allows the system to handle scenarios where resources are temporarily (cherry picked from commit 087048f) ## Proposed changes Issue Number: close #xxx <!--Describe your changes.-->
Proposed changes
FYI https://issues.apache.org/jira/browse/LOG4J2-1221
When threads are blocked, they are waiting for space in the ring buffer to become available, which can lead to potential deadlocks if not managed properly.
Timeout Handling:
LiteTimeoutBlockingWaitStrategy provides a timeout for waiting threads. If the buffer is not ready within the timeout period, the thread is released, preventing it from being blocked indefinitely.
Reduced Risk of Deadlocks:
By avoiding indefinite blocking, this strategy reduces the risk of deadlocks caused by threads waiting on each other. The timeout allows the system to handle scenarios where resources are temporarily