-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-26190 High rate logging of Bucket Allocator Allocation fails #3648
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
Conversation
|
@anoopsjohn Please review |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
|
||
| /* Tracing failed Bucket Cache allocations. */ | ||
| private long prevRecTE; // previous recorded time since Epoch in seconds | ||
| private static final int ALLOCATION_FAIL_TRACE_TIME_GAP = 60; // Default 60 seconds. |
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.
Can keep this as millisec so that for below time check, you can just use System.currentTimeMillis() alone
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.
Call it ALLOCATION_FAIL_LOG_TIME_PERIOD?
|
|
||
| /* Tracing failed Bucket Cache allocations. */ | ||
| private LongAdder allocationFailCount = new LongAdder(); | ||
| private LongAdder allocationFailSize = new LongAdder(); |
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.
do we need this really? I believe alloc fail count is enough in stat
| // Presume can't add. Too big? Move index on. Entry will be cleared from ramCache below. | ||
| bucketEntries[index] = null; | ||
| index++; | ||
| prevRecTE = currTE; |
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.
This will cause prevRecTE to set to curTS whenever BucketAllocatorException happens. We need to do that only when we log it
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.
Nice catch. Thanks.
| long currTE = System.currentTimeMillis()/1000; // Current time since Epoch in seconds. | ||
| // Record the warning. | ||
| cacheStats.allocationFailed(re.getData().getSerializedLength()); | ||
| if (prevRecTE == 0) { |
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.
May be just a common log is enoug?
if( prevRecTE == 0 || currTE - prevRecTE > ALLOCATION_FAIL_TRACE_TIME_GAP)
cc919e9 to
6c124f0
Compare
Incorporated review comments as at apache#3648.
Incorporated review comments as at apache#3648.
6c124f0 to
99b9378
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
5b9214c to
5eb4160
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
5eb4160 to
3e6921d
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
… too big Reduce the frequency of allocation failed traces by printing them preiodically (once per minute). Record the allocation failures in the Bucket Cache Stats and let the stat thread dump cumulative allocation failures alongside other traces it dumps. Also, this change adds trace for the Table name, Column Family and HFileName for the most recent allocation failure in last 1 minute.
too big Moved the construction of the warning message to a seaparte method.
… too big Incorporated review comments regarding code formatting, name of a the getWarningMessage, and name of variables like tableName.
3e6921d to
afd2a43
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
💔 -1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
Reduce the frequency of allocation failed traces by printing them once
periodically. Record the allocation failures in the Bucket Cache Stats
and let the stat thread dump cumulative allocation failures alongside
other traces it dumps.