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

[GitHub] [doris] freemandealer opened a new pull request, #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   Previously, when loading data, NodeChannel would open all tablets in all partitions when opening. This could cause a large number of useless tablets to be opened and empty rowsets to be created. In this commit, we only open tablets in a partition when they are actually written.
   
   # 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] github-actions[bot] commented on pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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 pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   PR approved by anyone and no changes requested.


-- 
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] freemandealer closed pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

Posted by "freemandealer (via GitHub)" <gi...@apache.org>.
freemandealer closed pull request #18640: [enhancement](storage) lazy-open necessary partitions when load
URL: https://github.com/apache/doris/pull/18640


-- 
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] dataroaring commented on a diff in pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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


##########
be/src/runtime/tablets_channel.cpp:
##########
@@ -228,17 +241,24 @@ Status TabletsChannel::_open_all_writers(const PTabletWriterOpenRequest& request
     }
     if (index_slots == nullptr) {
         std::stringstream ss;
-        ss << "unknown index id, key=" << _key;
+        ss << "unknown index id, key=" << _key << " tablet_id=" << tablet_id;
         return Status::InternalError(ss.str());
     }
-    for (auto& tablet : request.tablets()) {
+    int64_t partition_id = _tablet_partition_map[tablet_id];
+    DCHECK(partition_id != 0);
+    auto tablets = _partition_tablets_map[partition_id];
+    DCHECK(tablets.size() > 0);
+    LOG(INFO) << fmt::format(

Review Comment:
   DEBUG level is enough, high frequency ingestions would leads to too many logs.



-- 
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] freemandealer commented on pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   Already merged in https://github.com/apache/doris/pull/18874


-- 
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 pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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] freemandealer commented on pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   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] freemandealer commented on a diff in pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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


##########
be/src/runtime/tablets_channel.cpp:
##########
@@ -228,17 +241,24 @@ Status TabletsChannel::_open_all_writers(const PTabletWriterOpenRequest& request
     }
     if (index_slots == nullptr) {
         std::stringstream ss;
-        ss << "unknown index id, key=" << _key;
+        ss << "unknown index id, key=" << _key << " tablet_id=" << tablet_id;
         return Status::InternalError(ss.str());
     }
-    for (auto& tablet : request.tablets()) {
+    int64_t partition_id = _tablet_partition_map[tablet_id];
+    DCHECK(partition_id != 0);
+    auto tablets = _partition_tablets_map[partition_id];
+    DCHECK(tablets.size() > 0);
+    LOG(INFO) << fmt::format(

Review Comment:
   done



-- 
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 pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   clang-tidy review says "All clean, LGTM! :+1:"


-- 
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 pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   very very great PR...


-- 
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] hk-lrzy commented on pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   I see the PR no progress right now, can we continue it, it's very very important for us.
   BTW, if @ freemandealer have no time to finish it, maybe i can do this job.


-- 
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 pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   PR approved by at least one committer and no changes requested.


-- 
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] freemandealer commented on pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   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] freemandealer commented on pull request #18640: [enhancement](storage) lazy-open necessary partitions when load

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

   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