[FIXED] No redundant limit marker on KV purge#7026
Merged
neilalexander merged 1 commit intomainfrom Jul 21, 2025
Merged
Conversation
server/sdm.go
Outdated
| // isSubjectDeleteMarker returns whether the headers indicate this message is a subject delete marker. | ||
| // Either it's a usual marker with JSMarkerReason, or it's a KV Purge marker as the KVOperation. | ||
| func isSubjectDeleteMarker(hdr []byte) bool { | ||
| return len(getHeader(JSMarkerReason, hdr)) == 0 && !bytes.Equal(getHeader(KVOperation, hdr), KVOperationValuePurge) |
Member
There was a problem hiding this comment.
These could probably be sliceHeader for performance.
60671d8 to
22f0599
Compare
Contributor
|
Generally in favour of this, though I think we've not had customers filing issues for this so it's perhaps not as important as stated. In the past we've tried not to add KV specific stuff into the server, thats my only concern, wdyt @derekcollison |
Member
|
Which one are we keeping versus supresing? |
Member
Author
The original explicit |
server/jetstream_test.go
Outdated
| "time" | ||
|
|
||
| "github.com/nats-io/nats.go/jetstream" | ||
|
|
Member
Author
There was a problem hiding this comment.
This was due to a conflict in the file. Fixed after rebase.
aebc530 to
928e0d3
Compare
Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
928e0d3 to
94b0fb3
Compare
neilalexander
added a commit
that referenced
this pull request
Jul 25, 2025
Includes the following: - #7031 - #7033 - #7034 - #7035 - #7036 - #7040 - #7043 - #7045 - #7047 - #7046 - #7050 - #7051 - #7052 - #7053 - #7061 - #7063 - #7064 - #7065 - #7066 - #7070 - #7072 - #7080 - #7026 - #6728 - #7074 - #7089 - #7095 - #7087 - #7094 - #7096 - #7099 Signed-off-by: Neil Twigg <neil@nats.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When subject delete markers are enabled and you do a KV Purge with a TTL, you effectively get two subject delete markers. One of them is the explicit KV Purge operation, the other is the subject delete marker announcing (again) that the data is purged.
This PR is proposing to not have redundant limit markers, the KV Purge operation is in essence already a subject delete marker and should not trigger a "vanilla" subject delete marker duplicate.
Signed-off-by: Maurice van Veen github@mauricevanveen.com