You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/09/03 08:04:11 UTC

[GitHub] [incubator-doris] morningman commented on a change in pull request #4523: [Bug] Fix bug of core local value

morningman commented on a change in pull request #4523:
URL: https://github.com/apache/incubator-doris/pull/4523#discussion_r482786443



##########
File path: be/src/util/core_local.cpp
##########
@@ -61,6 +65,7 @@ class CoreDataAllocatorImpl : public CoreDataAllocator {
     }
 private:
     static constexpr int ELEMENTS_PER_BLOCK = BLOCK_SIZE / ELEMENT_BYTES;
+    SpinLock _lock; // lock to protect the modification of _blocks

Review comment:
       This is only used when creating the core local value (by calling `get_or_create()` of `CoreDataAllocatorImpl`).
   And when creating the value, there is nothing to do with "cpu-bind".
   
   The so called "cpu-bind" operation happens when accessing the `CoreLocalValue`,
   not related to `CoreDataAllocatorImpl`
   
   

##########
File path: be/src/util/core_local.cpp
##########
@@ -61,6 +65,7 @@ class CoreDataAllocatorImpl : public CoreDataAllocator {
     }
 private:
     static constexpr int ELEMENTS_PER_BLOCK = BLOCK_SIZE / ELEMENT_BYTES;
+    SpinLock _lock; // lock to protect the modification of _blocks

Review comment:
       This is only used when creating the core local value (by calling `get_or_create()` of `CoreDataAllocatorImpl`).
   And when creating the value, there is nothing to do with "cpu-bind".
   
   The so called "cpu-bind" operation happens when accessing the `CoreLocalValue`,
   not related to `CoreDataAllocatorImpl`
   
   




----------------------------------------------------------------
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.

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