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

Fix KV allow direct #879

Merged
merged 6 commits into from
Mar 18, 2024
Merged

Fix KV allow direct #879

merged 6 commits into from
Mar 18, 2024

Conversation

scottf
Copy link
Collaborator

@scottf scottf commented Mar 14, 2024

KV streams require allow_direct set to true. This setting was not done and now is fixed.

@scottf scottf requested a review from mtmk March 14, 2024 22:25

Assert.NotNull(kv1.Get(key1));
Assert.NotNull(kv1.Get(key2));
// TODO COME BACK ONCE SERVER IS FIXED
Copy link
Contributor

Choose a reason for hiding this comment

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

can we reference what the issue is?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, if one is made.

Copy link
Contributor

@mtmk mtmk left a comment

Choose a reason for hiding this comment

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

LGTM - probably good to reference what the issue is in TODO comments

@@ -47,7 +47,15 @@ private void Init(Msg msg, bool fromDirect, string streamName)
Headers = msg.Header;
Subject = msg.Header.GetLast(JetStreamConstants.NatsSubject);
Data = msg.Data;
Sequence = ulong.Parse(msg.Header[JetStreamConstants.NatsSequence]);
try
Copy link
Contributor

Choose a reason for hiding this comment

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

user TryParse instead

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Multiple values in the header.

Copy link
Contributor

@mtmk mtmk left a comment

Choose a reason for hiding this comment

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

LGTM

@scottf scottf merged commit 63b5912 into main Mar 18, 2024
1 check passed
@scottf scottf deleted the fix_kv_allow_direct branch March 18, 2024 22:21
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.

2 participants