xy720 commented on a change in pull request #3742:
URL: https://github.com/apache/incubator-doris/pull/3742#discussion_r435064627
##########
File path: be/src/olap/push_handler.cpp
##########
@@ -761,6 +915,126 @@ OLAPStatus LzoBinaryReader::_next_block() {
return res;
}
+OLAPStatus PushBrokerReader::init(const Schema* schema,
+ const TBrokerScanRange& t_scan_range,
+ const TDescriptorTable& t_desc_tbl) {
+ // init schema
+ _schema = schema;
+
+ // init runtime state, runtime profile, counter
+ TUniqueId dummy_id;
+ dummy_id.hi = 0;
+ dummy_id.lo = 0;
+ TPlanFragmentExecParams params;
+ params.fragment_instance_id = dummy_id;
+ params.query_id = dummy_id;
+ TExecPlanFragmentParams fragment_params;
+ fragment_params.params = params;
+ fragment_params.protocol_version = PaloInternalServiceVersion::V1;
+ TQueryOptions query_options;
+ TQueryGlobals query_globals;
+ _runtime_state.reset(new RuntimeState(fragment_params, query_options,
query_globals,
+ ExecEnv::GetInstance()));
+ DescriptorTbl* desc_tbl = NULL;
+ Status status = DescriptorTbl::create(_runtime_state->obj_pool(),
t_desc_tbl, &desc_tbl);
+ if (UNLIKELY(!status.ok())) {
+ LOG(WARNING) << "Failed to create descriptor table, msg: " <<
status.get_error_msg();
+ return OLAP_ERR_PUSH_INIT_ERROR;
+ }
+ _runtime_state->set_desc_tbl(desc_tbl);
+ status = _runtime_state->init_mem_trackers(dummy_id);
+ if (UNLIKELY(!status.ok())) {
+ LOG(WARNING) << "Failed to init mem trackers, msg: " <<
status.get_error_msg();
+ return OLAP_ERR_PUSH_INIT_ERROR;
+ }
+ _runtime_profile.reset(new RuntimeProfile(_runtime_state->obj_pool(),
"PushBrokerReader"));
+ _mem_tracker.reset(new MemTracker(-1));
Review comment:
Better keep it same as BrokerScanNode and OlapScanNode, they set memory
limit to -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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]