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 2021/11/19 12:42:12 UTC

[GitHub] [incubator-doris] xinyiZzz opened a new pull request #7164: [BRPC] Support brpc transfers RowBatch in Proto Request to Controller Attachment

xinyiZzz opened a new pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164


   ## Proposed changes
   
   Will add later…
   
   ## Types of changes
   
   What types of changes does your code introduce to Doris?
   _Put an `x` in the boxes that apply_
   
   - [x] Bugfix (non-breaking change which fixes an issue)
   - [ ] New feature (non-breaking change which adds functionality)
   - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
   - [ ] Documentation Update (if none of the other choices apply)
   - [ ] Code refactor (Modify the code structure, format the code, etc...)
   - [ ] Optimization. Including functional usability improvements and performance improvements.
   - [ ] Dependency. Such as changes related to third-party components.
   - [ ] Other.
   
   ## Checklist
   
   _Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
   
   - [x] I have created an issue on (Fix #7163) and described the bug/feature there in detail
   - [ ] Compiling and unit tests pass locally with my changes
   - [ ] I have added tests that prove my fix is effective or that my feature works
   - [ ] If these changes need document changes, I have updated the document
   - [ ] Any dependent changes have been merged
   
   ## Further comments
   
   If this is a relatively large or complex change, kick off the discussion at 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] [incubator-doris] xinyiZzz commented on a change in pull request #7164: [BRPC] Support brpc transfers RowBatch in Proto Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r753928474



##########
File path: be/src/util/proto_util.h
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+namespace doris {
+
+const int64_t MAX_REQUEST_BYTE_SIZE = 64 * 1024 * 1024;
+
+inline void row_batch_transfer_attachment(doris::PRowBatch* row_batch, butil::IOBuf* attachment) {
+    row_batch->set_tuple_data_size(row_batch->tuple_data().size());
+    attachment->append(row_batch->tuple_data());
+    row_batch->clear_tuple_data();
+    row_batch->set_tuple_data("");
+}
+
+template <typename Params, typename Closure>
+inline void request_transfer_attachment(Params* brpc_request, Closure* closure) {

Review comment:
       done, combines two methods




-- 
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] [incubator-doris] yangzhg commented on a change in pull request #7164: [BRPC] Support brpc transfers RowBatch in Proto Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r753901211



##########
File path: be/src/util/proto_util.h
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+namespace doris {
+
+const int64_t MAX_REQUEST_BYTE_SIZE = 64 * 1024 * 1024;

Review comment:
       Use this as a config instead `brpc_request_transfer_attachment`




-- 
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] [incubator-doris] yangzhg commented on a change in pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r759811488



##########
File path: be/src/common/config.h
##########
@@ -529,6 +529,9 @@ CONF_String(default_rowset_type, "BETA");
 CONF_Int64(brpc_max_body_size, "209715200");
 // Max unwritten bytes in each socket, if the limit is reached, Socket.Write fails with EOVERCROWDED
 CONF_Int64(brpc_socket_max_unwritten_bytes, "67108864");
+// Whether to transfer RowBatch in ProtoBuf Request to Controller Attachment and send it
+// through brpc, this will be faster and avoid the error of Request length overflow.
+CONF_mBool(brpc_request_rowbatch_to_attachment, "false");

Review comment:
       ```suggestion
   CONF_mBool(transfer_data_by_brpc_attachment, "false");
   ```




-- 
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] [incubator-doris] xinyiZzz commented on a change in pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r760730400



##########
File path: be/src/common/config.h
##########
@@ -529,6 +529,9 @@ CONF_String(default_rowset_type, "BETA");
 CONF_Int64(brpc_max_body_size, "209715200");
 // Max unwritten bytes in each socket, if the limit is reached, Socket.Write fails with EOVERCROWDED
 CONF_Int64(brpc_socket_max_unwritten_bytes, "67108864");
+// Whether to transfer RowBatch in ProtoBuf Request to Controller Attachment and send it
+// through brpc, this will be faster and avoid the error of Request length overflow.
+CONF_mBool(brpc_request_rowbatch_to_attachment, "false");

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] [incubator-doris] morningman merged pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164


   


-- 
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] [incubator-doris] yangzhg commented on a change in pull request #7164: [BRPC] Support brpc transfers RowBatch in Proto Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r753902127



##########
File path: gensrc/proto/data.proto
##########
@@ -33,6 +33,7 @@ message PRowBatch {
     repeated int32 tuple_offsets = 3;
     required bytes tuple_data = 4;
     required bool is_compressed = 5;
+    optional int64 tuple_data_size = 6;

Review comment:
       there is no flag to desccribe data is in tuple_data or attachment?




-- 
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] [incubator-doris] xinyiZzz commented on a change in pull request #7164: [BRPC] Support brpc transfers RowBatch in Proto Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r753928505



##########
File path: gensrc/proto/data.proto
##########
@@ -33,6 +33,7 @@ message PRowBatch {
     repeated int32 tuple_offsets = 3;
     required bytes tuple_data = 4;
     required bool is_compressed = 5;
+    optional int64 tuple_data_size = 6;

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] [incubator-doris] yangzhg commented on a change in pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r753943538



##########
File path: gensrc/proto/data.proto
##########
@@ -33,6 +33,7 @@ message PRowBatch {
     repeated int32 tuple_offsets = 3;
     required bytes tuple_data = 4;
     required bool is_compressed = 5;
+    optional bool transfer_attachment = 6;

Review comment:
       set default to false




-- 
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] [incubator-doris] github-actions[bot] commented on pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#issuecomment-983266336


   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] [incubator-doris] xinyiZzz commented on a change in pull request #7164: [BRPC] Support brpc transfers RowBatch in Proto Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r753927655



##########
File path: be/src/util/proto_util.h
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+namespace doris {
+
+const int64_t MAX_REQUEST_BYTE_SIZE = 64 * 1024 * 1024;

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] [incubator-doris] yangzhg commented on a change in pull request #7164: [BRPC] Support brpc transfers RowBatch in Proto Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r753901797



##########
File path: be/src/util/proto_util.h
##########
@@ -0,0 +1,52 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#pragma once
+
+namespace doris {
+
+const int64_t MAX_REQUEST_BYTE_SIZE = 64 * 1024 * 1024;
+
+inline void row_batch_transfer_attachment(doris::PRowBatch* row_batch, butil::IOBuf* attachment) {
+    row_batch->set_tuple_data_size(row_batch->tuple_data().size());
+    attachment->append(row_batch->tuple_data());
+    row_batch->clear_tuple_data();
+    row_batch->set_tuple_data("");
+}
+
+template <typename Params, typename Closure>
+inline void request_transfer_attachment(Params* brpc_request, Closure* closure) {

Review comment:
       Why not use `row_batch_transfer_attachment()` directly




-- 
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] [incubator-doris] xinyiZzz commented on a change in pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
xinyiZzz commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r756603945



##########
File path: gensrc/proto/data.proto
##########
@@ -33,6 +33,7 @@ message PRowBatch {
     repeated int32 tuple_offsets = 3;
     required bytes tuple_data = 4;
     required bool is_compressed = 5;
+    optional bool transfer_attachment = 6;

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] [incubator-doris] yangzhg commented on a change in pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
yangzhg commented on a change in pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#discussion_r758120295



##########
File path: gensrc/proto/data.proto
##########
@@ -40,6 +40,7 @@ message PRowBatch {
     repeated int32 tuple_offsets = 3;
     required bytes tuple_data = 4;
     required bool is_compressed = 5;
+    optional bool transfer_attachment = 6 [default = false];

Review comment:
       ```suggestion
       optional bool transfer_by_attachment = 6 [default = false];
   ```




-- 
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] [incubator-doris] github-actions[bot] commented on pull request #7164: [BRPC] Support transfer RowBatch in ProtoBuf Request to Controller Attachment

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7164:
URL: https://github.com/apache/incubator-doris/pull/7164#issuecomment-982503350






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