|
|
@ -1595,8 +1595,7 @@ func (s *Store) Snapshot() (raft.FSMSnapshot, error) {
|
|
|
|
|
|
|
|
|
|
|
|
// Restore restores the node to a previous state. The Hashicorp docs state this
|
|
|
|
// Restore restores the node to a previous state. The Hashicorp docs state this
|
|
|
|
// will not be called concurrently with Apply(), so synchronization with Execute()
|
|
|
|
// will not be called concurrently with Apply(), so synchronization with Execute()
|
|
|
|
// is not necessary. To prevent problems during queries, which may not go through
|
|
|
|
// is not necessary.
|
|
|
|
// the log, it blocks all query requests.
|
|
|
|
|
|
|
|
func (s *Store) Restore(rc io.ReadCloser) error {
|
|
|
|
func (s *Store) Restore(rc io.ReadCloser) error {
|
|
|
|
startT := time.Now()
|
|
|
|
startT := time.Now()
|
|
|
|
b, err := dbBytesFromSnapshot(rc)
|
|
|
|
b, err := dbBytesFromSnapshot(rc)
|
|
|
|