You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "xinyiZzz (via GitHub)" <gi...@apache.org> on 2023/05/04 17:28:29 UTC

[GitHub] [doris] xinyiZzz opened a new pull request, #19285: [fix](memory) Allocator throws Exception instead of std::bad_alloc

xinyiZzz opened a new pull request, #19285:
URL: https://github.com/apache/doris/pull/19285

   # Proposed changes
   
   Issue Number: close #xxx
   
   ## Problem summary
   
   Describe your changes.
   
   ## Checklist(Required)
   
   * [ ] Does it affect the original behavior
   * [ ] Has unit tests been added
   * [ ] Has document been added or modified
   * [ ] Does it need to update dependencies
   * [ ] Is this PR support rollback (If NO, please explain WHY)
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at [dev@doris.apache.org](mailto:dev@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc...
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei commented on a diff in pull request #19285: [fix](memory) Allocator throws Exception instead of std::bad_alloc

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei commented on code in PR #19285:
URL: https://github.com/apache/doris/pull/19285#discussion_r1185684666


##########
be/src/runtime/thread_context.h:
##########
@@ -74,6 +92,13 @@
 #define SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(mem_tracker_limiter) (void)0
 #endif
 
+#define SKIP_MEMORY_CHECK(...)                  \
+    do {                                        \

Review Comment:
   why add this macro?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] hello-stephen commented on pull request #19285: [fix](memory) Allocator throws Exception instead of std::bad_alloc

Posted by "hello-stephen (via GitHub)" <gi...@apache.org>.
hello-stephen commented on PR #19285:
URL: https://github.com/apache/doris/pull/19285#issuecomment-1535629103

   TeamCity pipeline, clickbench performance test result:
    the sum of best hot time: 33.82 seconds
    stream load tsv:          430 seconds loaded 74807831229 Bytes, about 165 MB/s
    stream load json:         21 seconds loaded 2358488459 Bytes, about 107 MB/s
    stream load orc:          58 seconds loaded 1101869774 Bytes, about 18 MB/s
    stream load parquet:          31 seconds loaded 861443392 Bytes, about 26 MB/s
    insert into select:          7.0 seconds inserted 5,000,000 Rows, about 714K ops/s
    https://doris-community-test-1308700295.cos.ap-hongkong.myqcloud.com/tmp/20230505024414_clickbench_pr_138353.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] xinyiZzz commented on pull request #19285: [fix](memory) Allocator throws Exception instead of std::bad_alloc

Posted by "xinyiZzz (via GitHub)" <gi...@apache.org>.
xinyiZzz commented on PR #19285:
URL: https://github.com/apache/doris/pull/19285#issuecomment-1535596404

   run buildall


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] yiguolei merged pull request #19285: [fix](memory) Allocator throws Exception instead of std::bad_alloc

Posted by "yiguolei (via GitHub)" <gi...@apache.org>.
yiguolei merged PR #19285:
URL: https://github.com/apache/doris/pull/19285


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] github-actions[bot] commented on a diff in pull request #19285: [fix](memory) Allocator throws Exception instead of std::bad_alloc

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on code in PR #19285:
URL: https://github.com/apache/doris/pull/19285#discussion_r1185312548


##########
be/src/vec/common/allocator.cpp:
##########
@@ -34,6 +34,7 @@
 
 template <bool clear_memory_, bool mmap_populate>
 void Allocator<clear_memory_, mmap_populate>::sys_memory_check(size_t size) const {
+    if (doris::skip_memory_check) return;

Review Comment:
   warning: statement should be inside braces [readability-braces-around-statements]
   
   ```suggestion
       if (doris::skip_memory_check) { return;
   }
   ```
   



##########
be/src/vec/common/allocator.cpp:
##########
@@ -74,14 +74,15 @@
                     size, doris::thread_context()->thread_mem_tracker()->label(),
                     doris::thread_context()->thread_mem_tracker_mgr->last_consumer_tracker(),
                     doris::MemTrackerLimiter::process_limit_exceeded_errmsg_str(size));
-            doris::thread_context()->thread_mem_tracker_mgr->save_exceed_mem_limit_msg(err_msg);
-            throw std::bad_alloc {};
+            doris::MemTrackerLimiter::print_log_process_usage(err_msg);
+            throw doris::Exception(doris::ErrorCode::MEM_ALLOC_FAILED, err_msg);
         }
     }
 }
 
 template <bool clear_memory_, bool mmap_populate>
 void Allocator<clear_memory_, mmap_populate>::memory_tracker_check(size_t size) const {
+    if (doris::skip_memory_check) return;

Review Comment:
   warning: statement should be inside braces [readability-braces-around-statements]
   
   ```suggestion
       if (doris::skip_memory_check) { return;
   }
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [doris] xinyiZzz commented on a diff in pull request #19285: [fix](memory) Allocator throws Exception instead of std::bad_alloc

Posted by "xinyiZzz (via GitHub)" <gi...@apache.org>.
xinyiZzz commented on code in PR #19285:
URL: https://github.com/apache/doris/pull/19285#discussion_r1185736438


##########
be/src/runtime/thread_context.h:
##########
@@ -74,6 +92,13 @@
 #define SCOPED_SWITCH_THREAD_MEM_TRACKER_LIMITER(mem_tracker_limiter) (void)0
 #endif
 
+#define SKIP_MEMORY_CHECK(...)                  \
+    do {                                        \

Review Comment:
   for later testing use



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org