"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "server/etcdserver/storage.go" between
etcd-3.5.6.tar.gz and etcd-3.5.7.tar.gz

About: etcd is a distributed reliable key-value store for the most critical data of a distributed system (written in "Go").

storage.go  (etcd-3.5.6):storage.go  (etcd-3.5.7)
skipping to change at line 18 skipping to change at line 18
// //
// Unless required by applicable law or agreed to in writing, software // Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, // distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
package etcdserver package etcdserver
import ( import (
"errors"
"io" "io"
pb "go.etcd.io/etcd/api/v3/etcdserverpb" pb "go.etcd.io/etcd/api/v3/etcdserverpb"
"go.etcd.io/etcd/client/pkg/v3/types" "go.etcd.io/etcd/client/pkg/v3/types"
"go.etcd.io/etcd/pkg/v3/pbutil" "go.etcd.io/etcd/pkg/v3/pbutil"
"go.etcd.io/etcd/raft/v3/raftpb" "go.etcd.io/etcd/raft/v3/raftpb"
"go.etcd.io/etcd/server/v3/etcdserver/api/snap" "go.etcd.io/etcd/server/v3/etcdserver/api/snap"
"go.etcd.io/etcd/server/v3/wal" "go.etcd.io/etcd/server/v3/wal"
"go.etcd.io/etcd/server/v3/wal/walpb" "go.etcd.io/etcd/server/v3/wal/walpb"
skipping to change at line 103 skipping to change at line 104
for { for {
if w, err = wal.Open(lg, waldir, snap); err != nil { if w, err = wal.Open(lg, waldir, snap); err != nil {
lg.Fatal("failed to open WAL", zap.Error(err)) lg.Fatal("failed to open WAL", zap.Error(err))
} }
if unsafeNoFsync { if unsafeNoFsync {
w.SetUnsafeNoFsync() w.SetUnsafeNoFsync()
} }
if wmetadata, st, ents, err = w.ReadAll(); err != nil { if wmetadata, st, ents, err = w.ReadAll(); err != nil {
w.Close() w.Close()
// we can only repair ErrUnexpectedEOF and we never repai r twice. // we can only repair ErrUnexpectedEOF and we never repai r twice.
if repaired || err != io.ErrUnexpectedEOF { if repaired || !errors.Is(err, io.ErrUnexpectedEOF) {
lg.Fatal("failed to read WAL, cannot be repaired" , zap.Error(err)) lg.Fatal("failed to read WAL, cannot be repaired" , zap.Error(err))
} }
if !wal.Repair(lg, waldir) { if !wal.Repair(lg, waldir) {
lg.Fatal("failed to repair WAL", zap.Error(err)) lg.Fatal("failed to repair WAL", zap.Error(err))
} else { } else {
lg.Info("repaired WAL", zap.Error(err)) lg.Info("repaired WAL", zap.Error(err))
repaired = true repaired = true
} }
continue continue
} }
 End of changes. 2 change blocks. 
1 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)