juicedata/juicefs · error

upload %s: %w

Error message

upload %s: %w

What it means

Streaming data into the Storj uplink upload object failed mid-transfer (io.Copy error) for the given key; the upload is aborted immediately. Fires on network interruption, reader failure, or the uplink rejecting segment data.

Source

Thrown at pkg/object/storj.go:168

	if err != nil {
		return fmt.Errorf("capture read position %s: %w", key, err)
	}
	return storjBackoff(ctx, func() error {
		if _, err := rs.Seek(startPos, io.SeekStart); err != nil {
			return err
		}
		return s.putOnce(ctx, key, rs)
	})
}

func (s *storjClient) putOnce(ctx context.Context, key string, in io.Reader) error {
	upload, err := s.project.UploadObject(ctx, s.bucket, key, nil)
	if err != nil {
		return fmt.Errorf("begin upload %s: %w", key, err)
	}
	if _, err = io.Copy(upload, in); err != nil {
		_ = upload.Abort()
		return fmt.Errorf("upload %s: %w", key, err)
	}
	if err = upload.Commit(); err != nil {
		_ = upload.Abort()
		return fmt.Errorf("commit upload %s: %w", key, err)
	}
	return nil
}

func (s *storjClient) Copy(ctx context.Context, dst, src string) error {
	return storjBackoff(ctx, func() error {
		_, err := s.project.CopyObject(ctx, s.bucket, src, s.bucket, dst, nil)
		return err
	})
}

func (s *storjClient) Delete(ctx context.Context, key string, getters ...AttrGetter) error {
	return storjBackoff(ctx, func() error {
		_, err := s.project.DeleteObject(ctx, s.bucket, key)

View on GitHub (pinned to c9a67b23e8)

Solutions

  1. Verify UFile credentials and part numbering is continuous from 0
  2. Retry the multipart upload; part PUTs may fail transiently
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at pkg/object/storj.go:168 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06). Data as JSON: /api/errors/8ab353164b3be2e5. Report an issue: GitHub.