This is an automated email from the ASF dual-hosted git repository.
lihaopeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c0db8533afb [fix](load) fix single replica load with auto partition
c0db8533afb is described below
commit c0db8533afbf70fbbcc3a4904c34a7dc273ab7c4
Author: zclllyybb <[email protected]>
AuthorDate: Wed Jan 3 11:53:09 2024 +0800
[fix](load) fix single replica load with auto partition
---
be/src/vec/sink/writer/vtablet_writer.cpp | 3 +++
fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java | 1 +
2 files changed, 4 insertions(+)
diff --git a/be/src/vec/sink/writer/vtablet_writer.cpp
b/be/src/vec/sink/writer/vtablet_writer.cpp
index 89519ad6ca0..7ceb7f16d3d 100644
--- a/be/src/vec/sink/writer/vtablet_writer.cpp
+++ b/be/src/vec/sink/writer/vtablet_writer.cpp
@@ -1059,6 +1059,9 @@ Status
VTabletWriter::on_partitions_created(TCreatePartitionResult* result) {
// add new tablet locations. it will use by address. so add to pool
auto* new_locations = _pool->add(new
std::vector<TTabletLocation>(result->tablets));
_location->add_locations(*new_locations);
+ if (_write_single_replica) {
+ _slave_location->add_locations(*new_locations);
+ }
// update new node info
_nodes_info->add_nodes(result->nodes);
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
index f85a621c967..485fde67fb1 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
@@ -527,6 +527,7 @@ public class OlapTableSink extends DataSink {
// for partition by function expr, there is no any partition firstly,
But this is required in thrift struct.
if (partitionIds.isEmpty()) {
locationParam.setTablets(new ArrayList<TTabletLocation>());
+ slaveLocationParam.setTablets(new ArrayList<TTabletLocation>());
}
// check if disk capacity reach limit
// this is for load process, so use high water mark to check
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]