forked from apache/doris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Fix](group commit) Fix table not found fault when disable group comm…
…it (apache#39731) <!--Describe your changes.--> selectRedirectBackend param table id is only needed by group commit. In non group commit mode, if table id is null, we need to ignore it.
- Loading branch information
1 parent
0e9fa3d
commit 7108b23
Showing
2 changed files
with
67 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...uites/load_p0/stream_load/test_group_commit_stream_load_with_nonexist_db_and_table.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// Licensed to the Apache Software Foundation (ASF) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
suite("test_group_commit_stream_load_with_nonexist_db_and_table") { | ||
def tableName = "test_group_commit_stream_load_with_nonexist_db_and_table" | ||
sql "create database if not exists ${tableName}" | ||
|
||
try { | ||
def command = "curl --location-trusted -u ${context.config.feHttpUser}:${context.config.feHttpPassword}" + | ||
" -H group_commit:sync_mode" + | ||
" -H column_separator:," + | ||
" -T ${context.config.dataPath}/load_p0/stream_load/test_stream_load1.csv" + | ||
" http://${context.config.feHttpAddress}/api/${tableName}/${tableName}/_stream_load" | ||
log.info("stream load command: ${command}") | ||
|
||
def process = command.execute() | ||
code = process.waitFor() | ||
out = process.text | ||
log.info("stream lad result: ${out}".toString()) | ||
assertTrue(out.toString().contains("table not found")) | ||
} catch (Exception e) { | ||
logger.info("failed: " + e.getMessage()) | ||
assertTrue(false) | ||
} finally { | ||
|
||
} | ||
} |