Skip to content

Commit

Permalink
Refuse to run on a non-shared or noop id cache
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Sep 10, 2024
1 parent 9a503b1 commit 1d0ca1c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/storage/fs/posix/posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,11 @@ func New(m map[string]interface{}, stream events.Stream) (storage.FS, error) {
return nil, err
}

switch o.IDCache.Store {
case "", "memory", "noop":
return nil, fmt.Errorf("the posix driver requires a shared id cache, e.g. nats-js-kv or redis")
}

tp, err := tree.New(lu, bs, um, trashbin, o, stream, store.Create(
store.Store(o.IDCache.Store),
store.TTL(o.IDCache.TTL),
Expand Down

0 comments on commit 1d0ca1c

Please sign in to comment.