mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Fixes possible message duplication in sourcing streams if upgrading to 2.10 and then back down to 2.9
2.10 adds a couple space separated fields to the sourcing message header from 2 to 4 but the current 2.9 code is too strict of checking the number of fields is exactly 2 rather than at least 2 Signed-off-by: Jean-Noël Moyne <jnmoyne@gmail.com>
This commit is contained in:
@@ -2983,7 +2983,7 @@ func streamAndSeq(shdr string) (string, uint64) {
|
||||
}
|
||||
// New version which is stream index name <SPC> sequence
|
||||
fields := strings.Fields(shdr)
|
||||
if len(fields) != 2 {
|
||||
if len(fields) < 2 {
|
||||
return _EMPTY_, 0
|
||||
}
|
||||
return fields[0], uint64(parseAckReplyNum(fields[1]))
|
||||
|
||||
Reference in New Issue
Block a user