cube2222/octosql

[ENHANCE] unix domain socket path too long

xqbumu opened this issue · 2 comments

If the length of socketPath exceeds 107, the listener will fail to be created, so we could:

  1. replace ulid with others, or change the rule of tmp dir
  2. add a config argument to set octosql's data dir
  3. or other methods

octosql/plugins/plugins.go

Lines 112 to 118 in 9ef95ec

socketName := ulid.MustNew(ulid.Now(), rand.Reader).String() + ".sock"
socketPath := filepath.Join(s.socketDir, socketName)
log.Printf("Listening execution on %s", socketPath)
lis, err := net.Listen("unix", socketPath)
if err != nil {
log.Fatal(err)
}

refer: golang/go#43635

Thanks for raising the issue! I'll look into it.

Hey! This is now added. You can customize the plugin tmp dir using the OCTOSQL_PLUGIN_TMP_DIR environment variable. I'll consider adding a flag for this in the future.