diff --git a/services/storage-users/pkg/command/uploads.go b/services/storage-users/pkg/command/uploads.go index d2e89d3b67..3c320d925f 100644 --- a/services/storage-users/pkg/command/uploads.go +++ b/services/storage-users/pkg/command/uploads.go @@ -75,7 +75,14 @@ func ListUploadSessions(cfg *config.Config) *cobra.Command { var fsStream events.Stream if cfg.Driver == "posix" { // We need to init the posix driver with 'scanfs' disabled - drivers["posix"] = revaconfig.Posix(cfg, false, false) + posixDrivers := revaconfig.Posix(cfg, false, false) + // Disable async file uploads: this command only lists sessions and publishes + // events, but with async uploads enabled the driver would join the "dcfs" + // JetStream queue group. Events routed to this short-lived CLI member are + // auto-acked by the nats client and lost when the process exits, so the + // clean/restart/resume events published below would never reach the daemon. + posixDrivers["asyncfileuploads"] = false + drivers["posix"] = posixDrivers // Also posix refuses to start without an events stream fsStream, err = event.NewStream(cfg) if err != nil { @@ -116,10 +123,8 @@ func ListUploadSessions(cfg *config.Config) *cobra.Command { return err } - var ( - table *tablewriter.Table - raw []*Session - ) + var table *tablewriter.Table + raw := []*Session{} if !renderJson { fmt.Println(buildInfo(filter))