mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Merge pull request #2104 from nats-io/pbug2
Make sure we do not set last to -1
This commit is contained in:
@@ -617,7 +617,7 @@ func (mb *msgBlock) rebuildState() (*LostStreamData, error) {
|
||||
}
|
||||
|
||||
// For empty msg blocks make sure we recover last seq correctly based off of first.
|
||||
if mb.msgs == 0 {
|
||||
if mb.msgs == 0 && mb.first.seq > 0 {
|
||||
mb.last.seq = mb.first.seq - 1
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user