mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-16 19:14:41 -07:00
Some users reporting checksums don't match and "no message cache" on recovery.
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -315,6 +315,11 @@ func newFileStoreWithCreated(fcfg FileStoreConfig, cfg StreamConfig, created tim
|
||||
// Always track per subject information.
|
||||
fs.tms = true
|
||||
|
||||
// Recover our message state.
|
||||
if err := fs.recoverMsgs(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// Write our meta data iff does not exist.
|
||||
meta := path.Join(fcfg.StoreDir, JetStreamMetaFile)
|
||||
if _, err := os.Stat(meta); err != nil && os.IsNotExist(err) {
|
||||
@@ -323,11 +328,6 @@ func newFileStoreWithCreated(fcfg FileStoreConfig, cfg StreamConfig, created tim
|
||||
}
|
||||
}
|
||||
|
||||
// Recover our message state.
|
||||
if err := fs.recoverMsgs(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// If we expect to be encrypted check that what we are restoring is not plaintext.
|
||||
// This can happen on snapshot restores or conversions.
|
||||
if fs.prf != nil {
|
||||
@@ -4430,6 +4430,9 @@ func (mb *msgBlock) generatePerSubjectInfo() error {
|
||||
if err == ErrStoreMsgNotFound || err == errDeletedMsg {
|
||||
continue
|
||||
}
|
||||
if err == errNoCache {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
if sm != nil && len(sm.subj) > 0 {
|
||||
|
||||
Reference in New Issue
Block a user