liaoxin01 commented on code in PR #52354:
URL: https://github.com/apache/doris/pull/52354#discussion_r2204925869
##########
be/src/vec/sink/writer/vtablet_writer.cpp:
##########
@@ -339,17 +386,94 @@ Status IndexChannel::check_each_node_channel_close(
if (node_channel_closed) {
close_status = it.second->after_close_handle(_parent->_state,
writer_stats,
node_add_batch_counter_map);
- unfinished_node_channel_ids->erase(it.first);
}
+
DBUG_EXECUTE_IF("IndexChannel.check_each_node_channel_close.close_status_not_ok",
+ { close_status = Status::InternalError("injected close
status not ok"); });
if (!close_status.ok()) {
final_status = cancel_channel_and_check_intolerable_failure(
std::move(final_status), close_status.to_string(), *this,
*it.second);
+ } else if (node_channel_closed) {
+ unfinished_node_channel_ids->erase(it.first);
Review Comment:
If close_status is not ok, the node channel will not be remove from
unfinished_node_channel_ids. The failed node channel will be repeatedly closed.
##########
be/src/vec/sink/writer/vtablet_writer.cpp:
##########
@@ -339,17 +386,94 @@ Status IndexChannel::check_each_node_channel_close(
if (node_channel_closed) {
close_status = it.second->after_close_handle(_parent->_state,
writer_stats,
node_add_batch_counter_map);
- unfinished_node_channel_ids->erase(it.first);
}
+
DBUG_EXECUTE_IF("IndexChannel.check_each_node_channel_close.close_status_not_ok",
+ { close_status = Status::InternalError("injected close
status not ok"); });
if (!close_status.ok()) {
final_status = cancel_channel_and_check_intolerable_failure(
std::move(final_status), close_status.to_string(), *this,
*it.second);
+ } else if (node_channel_closed) {
+ unfinished_node_channel_ids->erase(it.first);
}
}
return final_status;
}
+bool IndexChannel::_quorum_success(const std::unordered_set<int64_t>&
unfinished_node_channel_ids,
+ const std::unordered_set<int64_t>&
write_tablets) {
+ if (!config::enable_quorum_success_write) {
+ return false;
+ }
+ std::unordered_map<int64_t, int64_t> finished_tablets_replica;
+
+ // 1. collect all write tablets and finished tablets
+ for (const auto& [node_id, node_channel] : _node_channels) {
+ auto node_channel_write_tablets = node_channel->write_tablets();
+ if (unfinished_node_channel_ids.contains(node_id)) {
Review Comment:
The status of node channel should be checked.
--
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]