You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2022/08/19 12:17:33 UTC
[incubator-devlake] branch release-v0.12 updated (b11afae3 -> c5da8396)
This is an automated email from the ASF dual-hosted git repository.
warren pushed a change to branch release-v0.12
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
from b11afae3 feat: add be_host and fix hash columns
new 3e63caf2 feat: drop tmp table first and check redirect
new c5da8396 fix: add Connection: close in header
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
plugins/starrocks/tasks.go | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
[incubator-devlake] 01/02: feat: drop tmp table first and check redirect
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch release-v0.12
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 3e63caf2824b12ef75a973832178289384c99777
Author: Jinlong Peng <ji...@merico.dev>
AuthorDate: Fri Aug 19 17:39:41 2022 +0800
feat: drop tmp table first and check redirect
---
plugins/starrocks/tasks.go | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/plugins/starrocks/tasks.go b/plugins/starrocks/tasks.go
index 3bf9cfd3..9f9de75f 100644
--- a/plugins/starrocks/tasks.go
+++ b/plugins/starrocks/tasks.go
@@ -134,7 +134,7 @@ func loadData(starrocks *sql.DB, c core.SubTaskContext, starrocksTable string, t
offset := 0
starrocksTmpTable := starrocksTable + "_tmp"
// create tmp table in starrocks
- _, execErr := starrocks.Exec(fmt.Sprintf("create table %s like %s", starrocksTmpTable, starrocksTable))
+ _, execErr := starrocks.Exec(fmt.Sprintf("drop table if exists %s; create table %s like %s", starrocksTmpTable, starrocksTmpTable, starrocksTable))
if execErr != nil {
return execErr
}
@@ -195,10 +195,10 @@ func loadData(starrocks *sql.DB, c core.SubTaskContext, starrocksTable string, t
req.Header.Set(k, v)
}
resp, err := client.Do(req)
- if err != nil && err != http.ErrUseLastResponse {
+ if err != nil {
return err
}
- if err == http.ErrUseLastResponse {
+ if resp.StatusCode == 307 {
var location *url.URL
location, err = resp.Location()
req, err = http.NewRequest(http.MethodPut, location.String(), bytes.NewBuffer(jsonData))
[incubator-devlake] 02/02: fix: add Connection: close in header
Posted by wa...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch release-v0.12
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit c5da83969a8945658ea6b78d82947b770942bdbd
Author: Jinlong Peng <ji...@merico.dev>
AuthorDate: Fri Aug 19 18:39:43 2022 +0800
fix: add Connection: close in header
---
plugins/starrocks/tasks.go | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/starrocks/tasks.go b/plugins/starrocks/tasks.go
index 9f9de75f..61d4989a 100644
--- a/plugins/starrocks/tasks.go
+++ b/plugins/starrocks/tasks.go
@@ -176,6 +176,7 @@ func loadData(starrocks *sql.DB, c core.SubTaskContext, starrocksTable string, t
"strip_outer_array": "true",
"Expect": "100-continue",
"ignore_json_size": "true",
+ "Connection": "close",
}
jsonData, err := json.Marshal(data)
if err != nil {