-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Improve memory watermark detection #2885
Conversation
4569886
to
2f225fd
Compare
fb00cee
to
cb4b57e
Compare
cb4b57e
to
7ad379d
Compare
135b321
to
1f32cee
Compare
cc @MegaByte875 Watermark would check |
1f32cee
to
88e63f8
Compare
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.
src/graph/service/QueryEngine.cpp
Outdated
instance->execute(); | ||
} | ||
|
||
Status QueryEngine::setupBackgroundThread() { |
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.
We had many background thread now, better name it properly.
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.
Such as MemoryMonitor.
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.
Fixed. I think we could use the same thread to do the background task in the future.
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.
Generally LGTM, wait conflicts resolved.
throw std::runtime_error( | ||
folly::sformat("Used memory hits the high watermark({}) of total system memory.", | ||
FLAGS_system_memory_high_watermark_ratio)); |
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.
Where is handler the runtime error?
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.
Where is handler the runtime error?
What's about as below ?
if (MemoryUtils::kHitMemoryHighWatermark.load()) {
LOG(ERROR);
return true;
}
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.
There is a thenError in QueryInstance
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.
There is a thenError in QueryInstance
got . LGTM now. Please resolved conflicts.
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.
Stop the query execution by throwing the exception rather than skip some rows.
88e63f8
to
08ec4e3
Compare
Codecov Report
@@ Coverage Diff @@
## master #2885 +/- ##
==========================================
- Coverage 84.40% 84.30% -0.10%
==========================================
Files 1284 1283 -1
Lines 113608 113679 +71
==========================================
- Hits 95888 95839 -49
- Misses 17720 17840 +120
Continue to review full report at Codecov.
|
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.
Good job
fix #2497 and fix #2591