github-actions[bot] commented on code in PR #69554:
URL: https://github.com/apache/doris/pull/69554#discussion_r4545983101
##########
fe/fe-core/src/main/java/org/apache/doris/planner/RemoteOlapTableSink.java:
##########
@@ -61,7 +61,9 @@ public TPaloNodesInfo createPaloNodesInfo() {
if (backend == null) {
continue;
}
- nodesInfo.addToNodes(new TNodeInfo(backend.getId(), 0,
backend.getHost(), backend.getBrpcPort()));
+ TNodeInfo nodeInfo = new TNodeInfo(backend.getId(), 0,
backend.getHost(), backend.getBrpcPort());
+ nodeInfo.setIsLoadAvailable(backend.isLoadAvailable());
Review Comment:
[P2] Carry remote load eligibility through backend metadata
These `Backend` instances come from `DorisExternalMetaCache` via
`FeServiceClient.listBackends()` and `Backend.fromThrift()`. The remote
`getBackendMeta()` response carries only ID, addresses, ports and `isAlive`;
neither it nor `fromThrift()` transfers the disabled/shutdown flags, which
default to false. Consequently every alive remote backend is marked
load-available here even when the destination operator has set
`disable_load=true`, and INSERT INTO a remote Doris table continues sending
writer RPCs to that backend. Carry the effective eligibility through the remote
metadata protocol before deriving this flag, and cover an alive disabled remote
target.
##########
fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java:
##########
@@ -5033,7 +5033,7 @@ public TCreatePartitionResult
createPartition(TCreatePartitionRequest request) t
SystemInfoService systemInfoService = Env.getCurrentSystemInfo();
for (Long id : systemInfoService.getAllBackendByCurrentCluster(false))
{
Backend backend = systemInfoService.getBackend(id);
- nodeInfos.add(new TNodeInfo(backend.getId(), 0, backend.getHost(),
backend.getBrpcPort()));
+ nodeInfos.add(OlapTableSink.createLoadNodeInfo(backend));
Review Comment:
[P2] Refresh availability for backend IDs already in the directory
Both writer callbacks consume these nodes through
`DorisNodesInfo::add_nodes()`, which only inserts unknown IDs. The initial
directory already includes every backend, so this refreshed flag is ignored for
existing IDs. For example, an empty automatic table with replication=1 can
bootstrap on BE2 while BE1 is disabled; if BE1 is reenabled before a new
partition is created on it, this response says available but the writer retains
false. Legacy initialization marks the sole healthy replica failed, and V2
skips its stream, aborting the load. The reverse toggle keeps sending
new-partition writes to a newly disabled backend. Refresh the mutable
availability for known IDs in both create/replace partition paths and test the
toggle.
##########
be/src/exec/sink/writer/vtablet_writer_v2.cpp:
##########
@@ -313,6 +313,11 @@ Status VTabletWriterV2::_open_streams_to_backend(int64_t
dst_id, LoadStreamStubs
if (node_info == nullptr) {
return Status::InternalError("Unknown node {} in tablet location",
dst_id);
}
+ // FE keeps every alive replica in the location. A backend disabled for
load must consume the
+ // normal replica-failure allowance without receiving writer RPCs.
+ if (!node_info->is_load_available) {
Review Comment:
[P2] Honor the configured minimum when skipping V2 destinations
With an existing three-replica partition, `min_load_replica_num=1`, and two
alive `disable_load` backends, the new FE sends all three location IDs and the
correct required count of one. This branch leaves only the healthy backend
open, but `_select_streams()` still rejects `streams.size() <=
location->node_ids.size() / 2`, so every V2 load fails with one stream out of
three even though its configured minimum is satisfied. The legacy writer
accepts that policy. Use the tablet's required count for stream sufficiency and
add a required=1 selection test. Unlike thread 4370332391, this occurs with a
fully upgraded FE and explicit correct requirements, before any RPC failure.
--
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]