juicedata/juicefs · error
not supported
Error message
not supported
What it means
memcache.stage is a stub: the in-memory cache manager does not support staging blocks for writeback, so it always returns this error. Any code path that tries to stage uploaded/pending blocks into a memory-only cache will get "not supported".
Source
Thrown at pkg/chunk/mem_cache.go:210
break
}
if v.atime.Before(cutoff) {
deleted++
freed += int64(cap(v.page.Data))
c.metrics.cacheEvicts.Add(1)
c.delete(k, v.page)
}
}
c.Unlock()
if deleted > 0 {
logger.Debugf("Expired cache blocks: %d blocks (%s), remaining: %d blocks (%s)", deleted, humanize.IBytes(uint64(freed)), len(c.pages), humanize.IBytes(uint64(c.used)))
}
time.Sleep(interval / 1000 * time.Duration((cnt+1-deleted)*1000/(cnt+1)))
}
}
func (c *memcache) stage(key string, data []byte, tierID uint8) (string, error) {
return "", errors.New("not supported")
}
func (c *memcache) uploaded(key string, size int) {}
func (c *memcache) isEmpty() bool { return false }
func (c *memcache) getMetrics() *cacheManagerMetrics { return c.metrics }
View on GitHub (pinned to c9a67b23e8)
Solutions
- Use a disk-based --cache-dir (real path) when writeback/staging is required; memory cache cannot stage.
- Drop --writeback when using memory cache so blocks are uploaded synchronously instead of staged.
- If staging was intended for the memory cache, use disk cache or restructure to upload directly.
Example fix
// before juicefs mount --cache-dir memory --writeback sqlite3://test.db /mnt/jfs // after juicefs mount --cache-dir /var/jfsCache --writeback sqlite3://test.db /mnt/jfs
Defensive patterns
Strategy: validation
Validate before calling
func stagingSupported(cacheDir string) bool {
return cacheDir != "memory"
} Try / catch
if _, err := cache.Stage(key, data); err != nil {
if err.Error() == "not supported" {
return uploadDirect(key, data)
}
return err
} Prevention
- Never combine --cache-dir memory with --writeback
- Use a disk cache dir when staging is required
- Check cache manager type before calling Stage
When it happens
Trigger: Calling stage() on a memcache instance, i.e. running with --cache-dir set to memory (or cache manager resolved to memcache) while a code path requests block staging (writeback flow).
Common situations: Mounting with --cache-dir memory together with --writeback, where staging to disk is impossible; tests that exercise stage against the memory cache.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- invalid hour number
- space not enough on device
- concurrent staging limit reached
- page is already released
- ErrNotSUP
AI-assisted analysis of juicedata/juicefs@c9a67b23e8 (2026-09-06).
Data as JSON: /api/errors/41b94cea3b3cf902.
Report an issue: GitHub.