-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[JS] direct get apis include old Nats-
headers creating duplicates
#4573
Labels
defect
Suspected defect such as a bug or regression
Comments
aricart
added a commit
that referenced
this issue
Oct 3, 2023
… it simply appends JSON bytes to existing headers. If the message was onboarded on a republish, this will contain system headers. Since headers are not ordered and can contain multiple values for the same header, this can break KV clients as well as create ambiguity on the stream that yielded the message. Fix #4573
7 tasks
aricart
added a commit
that referenced
this issue
Oct 3, 2023
… it simply appends JSON bytes to existing headers. If the message was onboarded on a republish, this will contain system headers. Since headers are not ordered and can contain multiple values for the same header, this can break KV clients as well as create ambiguity on the stream that yielded the message. Fix #4573
aricart
added a commit
that referenced
this issue
Oct 3, 2023
… it simply appends JSON bytes to existing headers. If the message was onboarded on a republish, this will contain system headers. Since headers are not ordered and can contain multiple values for the same header, this can break KV clients as well as create ambiguity on the stream that yielded the message. Fix #4573
aricart
added a commit
that referenced
this issue
Oct 3, 2023
… it simply appends JSON bytes to existing headers. If the message was onboarded on a republish, this will contain system headers. Since headers are not ordered and can contain multiple values for the same header, this can break KV clients as well as create ambiguity on the stream that yielded the message. Fix #4573
aricart
added a commit
that referenced
this issue
Oct 3, 2023
… it simply appends JSON bytes to existing headers. If the message was onboarded on a republish, this will contain system headers. Since headers are not ordered and can contain multiple values for the same header, this can break KV clients as well as create ambiguity on the stream that yielded the message. Fix #4573
aricart
added a commit
that referenced
this issue
Oct 4, 2023
… it simply appends JSON bytes to existing headers. If the message was onboarded on a republish, this will contain system headers. Since headers are not ordered and can contain multiple values for the same header, this can break KV clients as well as create ambiguity on the stream that yielded the message. Fix #4573
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What version were you using?
2.10.1
What environment was the server running in?
any
Is this defect reproducible?
To reproduce the error:
Save this program to
direct_issue.ts
Start a nats server with JetStream
Given the capability you are leveraging, describe your expectation?
The headers from the added by the stream republish onboarding into KV shouldn't be reported. The side effect of that is Get operations trying to figure out the name of the key will fail, as there are multiple
Nats-Subject
entries (as well as sequence etc.).For KV implementations, there's a check on the subject header - depending on what the map implementation does, it may get one or the other header (go gets the second). The algorithm will remove the prefix, which then yields a key that is different from what the client is looking for resulting in a not found error on the lookup.
Given the expectation, what is the defect you are observing?
Nats-
headers shouldn't have duplicates.The text was updated successfully, but these errors were encountered: