Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/filestore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func TestFileStoreBasics(t *testing.T) {
defer fs.Stop()

subj, msg := "foo", []byte("Hello World")
now := time.Now().UnixNano()
for i := 1; i <= 5; i++ {
now := time.Now().UnixNano()
if seq, ts, err := fs.StoreMsg(subj, nil, msg); err != nil {
t.Fatalf("Error storing msg: %v", err)
} else if seq != uint64(i) {
Expand Down
6 changes: 3 additions & 3 deletions server/jetstream_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -3161,11 +3161,11 @@ func (js *jetStream) processStreamLeaderChange(mset *stream, isLeader bool) {

// Clear clseq. If we become leader again, it will be fixed up
// automatically on the next processClusteredInboundMsg call.
mset.mu.Lock()
mset.clMu.Lock()
if mset.clseq > 0 {
mset.clseq = 0
}
mset.mu.Unlock()
mset.clMu.Unlock()
}

// Tell stream to switch leader status.
Expand Down Expand Up @@ -7721,7 +7721,7 @@ func (mset *stream) processClusteredInboundMsg(subject, reply string, hdr, msg [
if mset.inflight == nil {
mset.inflight = make(map[uint64]uint64)
}
if mset.cfg.Storage == FileStorage {
if stype == FileStorage {
mset.inflight[mset.clseq] = fileStoreMsgSize(subject, hdr, msg)
} else {
mset.inflight[mset.clseq] = memStoreMsgSize(subject, hdr, msg)
Expand Down