add log for repeat/space cost too much memory
This commit is contained in:
@ -210,6 +210,9 @@ int ObExprRepeat::repeat_text(ObObjType res_type,
|
|||||||
int64_t tot_length = length * count;
|
int64_t tot_length = length * count;
|
||||||
int64_t buffer_len = 0;
|
int64_t buffer_len = 0;
|
||||||
char *buf = NULL;
|
char *buf = NULL;
|
||||||
|
if (tot_length >= MEM_WARN_THRESHOLD) {
|
||||||
|
LOG_INFO("once repeat cost over 100M", K(ret), K(tot_length), K(length), K(count));
|
||||||
|
}
|
||||||
ObTextStringResult result_buffer(res_type, has_lob_header, &allocator);
|
ObTextStringResult result_buffer(res_type, has_lob_header, &allocator);
|
||||||
if (OB_FAIL(result_buffer.init(tot_length))) {
|
if (OB_FAIL(result_buffer.init(tot_length))) {
|
||||||
LOG_WARN("init result failed", K(ret), K(tot_length));
|
LOG_WARN("init result failed", K(ret), K(tot_length));
|
||||||
|
|||||||
@ -62,6 +62,7 @@ public:
|
|||||||
ObIAllocator &allocator,
|
ObIAllocator &allocator,
|
||||||
const int64_t max_result_size);
|
const int64_t max_result_size);
|
||||||
private:
|
private:
|
||||||
|
static const int64_t MEM_WARN_THRESHOLD = 100 * 1024 * 1024; // 100M
|
||||||
// disallow copy
|
// disallow copy
|
||||||
DISALLOW_COPY_AND_ASSIGN(ObExprRepeat);
|
DISALLOW_COPY_AND_ASSIGN(ObExprRepeat);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user