Closed christopher-wong closed 2 months ago
@ripienaar would appreciate another look when you have some time.
Thank you @christopher-wong have it on my to do list to get back to soon just dealing with some stuff :)
I'm happy and ready to merge. Thanks for the review!
Looks like we have a nil pointer in the tests:
=== RUN TestStream_Snapshot
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x12aface]
goroutine 11917 [running]:
github.com/nats-io/jsm%2ego.(*Stream).createSnapshot.func2(0xc000322230)
/home/runner/work/jsm.go/jsm.go/snapshots.go:400 +0xce
github.com/nats-io/nats%2ego.(*Conn).waitForMsgs(0xc0008fae00, 0xc0000a0000)
/home/runner/work/jsm.go/pkg/mod/github.com/nats-io/nats.go@v1.35.0/nats.go:3155 +0x79f
created by github.com/nats-io/nats%2ego.(*Conn).subscribeLocked in goroutine 11566
/home/runner/work/jsm.go/pkg/mod/github.com/nats-io/nats.go@v1.35.0/nats.go:4368 +0x7ff
FAIL github.com/nats-io/jsm.go 23.540s
Fixed! Sorry about that - variable shadowing bug.
Nice one, thank you
Support creating and restoring snapshots from
io.Reader
andio.Writer
instead of a file on disk.