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:
Jean-Noël Moyne
2023-08-30 15:27:26 -07:00
parent d6e7106eee
commit 003daf3db8

View File

@@ -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]))