From c10fedaa514b74bd2edf451ea74bbb66584ee978 Mon Sep 17 00:00:00 2001 From: yun Date: Mon, 14 Oct 2024 05:38:25 -0700 Subject: [PATCH] manually set false about SLING_PROCESS_BW fix #11 ref: https://github.com/flarco/g/issues/1 --- core/sling/task_run_write.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/sling/task_run_write.go b/core/sling/task_run_write.go index 9b6ce39d..2097c2bf 100644 --- a/core/sling/task_run_write.go +++ b/core/sling/task_run_write.go @@ -133,6 +133,11 @@ func (t *TaskExecution) WriteToFile(cfg *Config, df *iop.Dataflow) (cnt uint64, func (t *TaskExecution) WriteToDb(cfg *Config, df *iop.Dataflow, tgtConn database.Connection) (cnt uint64, err error) { defer t.PBar.Finish() + // Force SLING_PROCESS_BW to false for Proton + if tgtConn.GetType() == dbio.TypeDbProton { + os.Setenv("SLING_PROCESS_BW", "false") + } + // detect empty if len(df.Columns) == 0 { err = g.Error("no stream columns detected")