mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Make arg order same for Snapshot
Signed-off-by: Derek Collison <derek@nats.io>
This commit is contained in:
@@ -2163,7 +2163,7 @@ func (fs *fileStore) streamSnapshot(w io.WriteCloser, blks []*msgBlock, includeC
|
||||
}
|
||||
|
||||
// Create a snapshot of this stream and its consumer's state along with messages.
|
||||
func (fs *fileStore) Snapshot(deadline time.Duration, includeConsumers, checkMsgs bool) (*SnapshotResult, error) {
|
||||
func (fs *fileStore) Snapshot(deadline time.Duration, checkMsgs, includeConsumers bool) (*SnapshotResult, error) {
|
||||
fs.mu.Lock()
|
||||
if fs.closed {
|
||||
fs.mu.Unlock()
|
||||
|
||||
@@ -1245,7 +1245,7 @@ func TestFileStoreSnapshot(t *testing.T) {
|
||||
|
||||
// Now check to make sure that we get the correct error when trying to delete or erase
|
||||
// a message when a snapshot is in progress and that closing the reader releases that condition.
|
||||
sr, err := fs.Snapshot(5*time.Second, true, false)
|
||||
sr, err := fs.Snapshot(5*time.Second, false, true)
|
||||
if err != nil {
|
||||
t.Fatalf("Error creating snapshot")
|
||||
}
|
||||
|
||||
@@ -978,7 +978,7 @@ func (mset *Stream) Snapshot(deadline time.Duration, checkMsgs, includeConsumers
|
||||
o.writeState()
|
||||
}
|
||||
|
||||
return store.Snapshot(deadline, includeConsumers, checkMsgs)
|
||||
return store.Snapshot(deadline, checkMsgs, includeConsumers)
|
||||
}
|
||||
|
||||
const snapsDir = "__snapshots__"
|
||||
|
||||
Reference in New Issue
Block a user