github-actions[bot] commented on code in PR #18874:
URL: https://github.com/apache/doris/pull/18874#discussion_r1174493284
##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -1014,6 +1071,35 @@
return Status::OK();
}
+void VOlapTableSink::_open_partition(const VOlapTablePartition* partition,
uint32_t tablet_index) {
+ SCOPED_CONSUME_MEM_TRACKER(_node_channel_tracker.get());
Review Comment:
warning: use of undeclared identifier '_node_channel_tracker'
[clang-diagnostic-error]
```cpp
SCOPED_CONSUME_MEM_TRACKER(_node_channel_tracker.get());
^
```
##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -1014,6 +1071,35 @@
return Status::OK();
}
+void VOlapTableSink::_open_partition(const VOlapTablePartition* partition,
uint32_t tablet_index) {
+ SCOPED_CONSUME_MEM_TRACKER(_node_channel_tracker.get());
+
+ for (int j = 0; j < partition->indexes.size(); ++j) {
+ auto tid = partition->indexes[j].tablets[tablet_index];
+ auto it = _channels[j]->_channels_by_tablet.find(tid);
+ DCHECK(it != _channels[j]->_channels_by_tablet.end())
+ << "unknown tablet, tablet_id=" << tablet_index;
+ for (const auto& channel : it->second) {
+ channel->open_partition(partition->id);
+ }
+ }
+}
+
+Status VOlapTableSink::_open_partition_wait(const VOlapTablePartition*
partition,
+ uint32_t tablet_index) {
+ SCOPED_CONSUME_MEM_TRACKER(_node_channel_tracker.get());
Review Comment:
warning: use of undeclared identifier '_node_channel_tracker'
[clang-diagnostic-error]
```cpp
SCOPED_CONSUME_MEM_TRACKER(_node_channel_tracker.get());
^
```
##########
be/src/vec/sink/vtablet_sink.cpp:
##########
@@ -424,6 +425,62 @@ Status VNodeChannel::open_wait() {
return status;
}
+void VNodeChannel::open_partition(int64_t partition_id) {
+ SCOPED_CONSUME_MEM_TRACKER(_node_channel_tracker.get());
+ PartitionOpenRequest request;
+
+ RefCountClosure<PartitionOpenResult>* partition_open_closure =
+ new RefCountClosure<PartitionOpenResult>();
+ _partition_open_closures.insert(std::pair(partition_id,
partition_open_closure));
+ partition_open_closure->ref();
+
+ // This ref is for RPC's reference
+ partition_open_closure->ref();
+
partition_open_closure->cntl.set_timeout_ms(config::partition_open_rpc_timeout_sec
* 1000);
+ if (config::partition_open_ignore_eovercrowded) {
+ partition_open_closure->cntl.ignore_eovercrowded();
+ }
+ // Lazy open delter writer
+ _stub->partition_open(&partition_open_closure->cntl, &request,
&partition_open_closure->result,
+ partition_open_closure);
+}
+
+Status VNodeChannel::open_partition_wait(int64_t partition_id) {
+ auto partition_it = _partition_open_closures.find(partition_id);
+ RefCountClosure<PartitionOpenResult>* partition_open_closure = nullptr;
+ if (partition_it != _partition_open_closures.end()) {
+ RefCountClosure<PartitionOpenResult>* partition_open_closure =
partition_it->second;
Review Comment:
warning: unused variable 'partition_open_closure'
[clang-diagnostic-unused-variable]
```cpp
RefCountClosure<PartitionOpenResult>* partition_open_closure =
partition_it->second;
^
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]