Skip to content
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

[FEAT] [EXPERIMENTAL] direct get of messages for KV #316

Merged
merged 1 commit into from
Jun 3, 2022
Merged

Conversation

aricart
Copy link
Member

@aricart aricart commented Jun 1, 2022

  • [FEAT] implemented getDirectMessage() experimental feature
  • [FEAT] [KV] experimental - KvOptions can now specify allow_direct which enables the creation of streams on servers that supported that enable the direct api which may provide better performance on gets for KV.
  • [FIX] internal checkJsErrorCode() was passing a status instead of a description, creating error descriptions prefixed by the error code

[FEAT] [KV] experimental - KvOptions can now specify `allow_direct` which enables the creation of streams on servers that supported that enable the direct api which may provide better performance on gets for KV.
[FIX] internal checkJsErrorCode() was passing a status instead of a description, creating error descriptions prefixed by the error code
@aricart
Copy link
Member Author

aricart commented Jun 1, 2022

The matching server pull

nats-io/nats-server#3158

nats-base-client/types.ts Show resolved Hide resolved
nats-base-client/types.ts Show resolved Hide resolved
@@ -89,7 +89,7 @@ export function checkJsError(msg: Msg): NatsError | null {
if (!h) {
return null;
}
return checkJsErrorCode(h.code, h.status);
return checkJsErrorCode(h.code, h.description);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to check description vs status?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the status line contains the code/message - the description is just the message part of that combo, so it uglified some of the errors.

Copy link
Contributor

@piotrpio piotrpio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants