-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse Snapshot message header to check for non-204 status codes #545
Parse Snapshot message header to check for non-204 status codes #545
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small changes, thanks!
@@ -692,128 +705,3 @@ func (m *Manager) RestoreSnapshotFromBuffer(ctx context.Context, stream string, | |||
_, ss, err := m.restoreSnapshot(ctx, stream, dataReader, metadataReader, sopts) | |||
return ss, err | |||
} | |||
|
|||
// SnapshotToBuffer creates a compressed s2 backup and writes to an io.Writer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SnapshotToBufferOld
was accidentally committed during the refactor - removing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you |
When the server cancels backup due to a timeout or lost interest, the jetstream backup client does not return an error. This change parses the error from the nats message header and returns an error to the caller if it's anything but a successful 204.
https://github.com/nats-io/nats-server/blob/main/server/jetstream_api.go#L3823