mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix some typos
Signed-off-by: thirdkeyword <fliterdashen@gmail.com>
This commit is contained in:
parent
b643f1b1fe
commit
fbda591866
@ -126,7 +126,7 @@ func NewCheckPerfCommand() *cobra.Command {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// TODO: support customized configuration
|
// TODO: support customized configuration
|
||||||
cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge). Different workload models use different configurations in terms of number of clients and expected throughtput.")
|
cmd.Flags().StringVar(&checkPerfLoad, "load", "s", "The performance check's workload model. Accepted workloads: s(small), m(medium), l(large), xl(xLarge). Different workload models use different configurations in terms of number of clients and expected throughput.")
|
||||||
cmd.Flags().StringVar(&checkPerfPrefix, "prefix", "/etcdctl-check-perf/", "The prefix for writing the performance check's keys.")
|
cmd.Flags().StringVar(&checkPerfPrefix, "prefix", "/etcdctl-check-perf/", "The prefix for writing the performance check's keys.")
|
||||||
cmd.Flags().BoolVar(&autoCompact, "auto-compact", false, "Compact storage with last revision after test is finished.")
|
cmd.Flags().BoolVar(&autoCompact, "auto-compact", false, "Compact storage with last revision after test is finished.")
|
||||||
cmd.Flags().BoolVar(&autoDefrag, "auto-defrag", false, "Defragment storage after test is finished.")
|
cmd.Flags().BoolVar(&autoDefrag, "auto-defrag", false, "Defragment storage after test is finished.")
|
||||||
|
@ -542,7 +542,7 @@ function dep_pass {
|
|||||||
duplicates=$(echo "${all_dependencies}" | cut -d ',' -f 1,2 | sort | uniq | cut -d ',' -f 1 | sort | uniq -d) || return 2
|
duplicates=$(echo "${all_dependencies}" | cut -d ',' -f 1,2 | sort | uniq | cut -d ',' -f 1 | sort | uniq -d) || return 2
|
||||||
|
|
||||||
for dup in ${duplicates}; do
|
for dup in ${duplicates}; do
|
||||||
log_error "FAIL: inconsistent versions for depencency: ${dup}"
|
log_error "FAIL: inconsistent versions for dependency: ${dup}"
|
||||||
echo "${all_dependencies}" | grep "${dup}" | sed "s|\\([^,]*\\),\\([^,]*\\),\\([^,]*\\)| - \\1@\\2 from: \\3|g"
|
echo "${all_dependencies}" | grep "${dup}" | sed "s|\\([^,]*\\),\\([^,]*\\),\\([^,]*\\)| - \\1@\\2 from: \\3|g"
|
||||||
done
|
done
|
||||||
if [[ -n "${duplicates}" ]]; then
|
if [[ -n "${duplicates}" ]]; then
|
||||||
|
@ -81,7 +81,7 @@ if [ "${GET}" != "${VALUE}" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Succesfully tested etcd local image ${TAG}"
|
echo "Successfully tested etcd local image ${TAG}"
|
||||||
|
|
||||||
for TARGET_ARCH in "amd64" "arm64" "ppc64le" "s390x"; do
|
for TARGET_ARCH in "amd64" "arm64" "ppc64le" "s390x"; do
|
||||||
ARCH_TAG=v"${VERSION}"-"${TARGET_ARCH}"
|
ARCH_TAG=v"${VERSION}"-"${TARGET_ARCH}"
|
||||||
|
@ -413,15 +413,15 @@ function run_go_tool {
|
|||||||
GOARCH="" run "${cmdbin}" "$@" || return 2
|
GOARCH="" run "${cmdbin}" "$@" || return 2
|
||||||
}
|
}
|
||||||
|
|
||||||
# assert_no_git_modifications fails if there are any uncommited changes.
|
# assert_no_git_modifications fails if there are any uncommitted changes.
|
||||||
function assert_no_git_modifications {
|
function assert_no_git_modifications {
|
||||||
log_callout "Making sure everything is committed."
|
log_callout "Making sure everything is committed."
|
||||||
if ! git diff --cached --exit-code; then
|
if ! git diff --cached --exit-code; then
|
||||||
log_error "Found staged by uncommited changes. Do commit/stash your changes first."
|
log_error "Found staged by uncommitted changes. Do commit/stash your changes first."
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
if ! git diff --exit-code; then
|
if ! git diff --exit-code; then
|
||||||
log_error "Found unstaged and uncommited changes. Do commit/stash your changes first."
|
log_error "Found unstaged and uncommitted changes. Do commit/stash your changes first."
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,9 @@ func TestBackendPreCommitHook(t *testing.T) {
|
|||||||
// Empty commit.
|
// Empty commit.
|
||||||
tx.Commit()
|
tx.Commit()
|
||||||
|
|
||||||
assert.Equal(t, ">cc", getCommitsKey(t, be), "expected 2 explict commits")
|
assert.Equal(t, ">cc", getCommitsKey(t, be), "expected 2 explicit commits")
|
||||||
tx.Commit()
|
tx.Commit()
|
||||||
assert.Equal(t, ">ccc", getCommitsKey(t, be), "expected 3 explict commits")
|
assert.Equal(t, ">ccc", getCommitsKey(t, be), "expected 3 explicit commits")
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestBackendAutoCommitLimitHook(t *testing.T) {
|
func TestBackendAutoCommitLimitHook(t *testing.T) {
|
||||||
|
@ -79,7 +79,7 @@ func TestGetAllRoles(t *testing.T) {
|
|||||||
want: []*authpb.Role{{Name: []byte("role2")}},
|
want: []*authpb.Role{{Name: []byte("role2")}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Returns data overriden by put",
|
name: "Returns data overridden by put",
|
||||||
setup: func(tx auth.UnsafeAuthWriter) {
|
setup: func(tx auth.UnsafeAuthWriter) {
|
||||||
tx.UnsafePutRole(&authpb.Role{
|
tx.UnsafePutRole(&authpb.Role{
|
||||||
Name: []byte("role1"),
|
Name: []byte("role1"),
|
||||||
@ -179,7 +179,7 @@ func TestGetRole(t *testing.T) {
|
|||||||
want: nil,
|
want: nil,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Returns data overriden by put",
|
name: "Returns data overridden by put",
|
||||||
setup: func(tx auth.UnsafeAuthWriter) {
|
setup: func(tx auth.UnsafeAuthWriter) {
|
||||||
tx.UnsafePutRole(&authpb.Role{
|
tx.UnsafePutRole(&authpb.Role{
|
||||||
Name: []byte("role1"),
|
Name: []byte("role1"),
|
||||||
|
@ -75,7 +75,7 @@ func TestGetAllUsers(t *testing.T) {
|
|||||||
want: []*authpb.User{{Name: []byte("bob")}},
|
want: []*authpb.User{{Name: []byte("bob")}},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Returns data overriden by put",
|
name: "Returns data overridden by put",
|
||||||
setup: func(tx auth.UnsafeAuthWriter) {
|
setup: func(tx auth.UnsafeAuthWriter) {
|
||||||
tx.UnsafePutUser(&authpb.User{
|
tx.UnsafePutUser(&authpb.User{
|
||||||
Name: []byte("alice"),
|
Name: []byte("alice"),
|
||||||
@ -163,7 +163,7 @@ func TestGetUser(t *testing.T) {
|
|||||||
want: nil,
|
want: nil,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Returns data overriden by put",
|
name: "Returns data overridden by put",
|
||||||
setup: func(tx auth.UnsafeAuthWriter) {
|
setup: func(tx auth.UnsafeAuthWriter) {
|
||||||
tx.UnsafePutUser(&authpb.User{
|
tx.UnsafePutUser(&authpb.User{
|
||||||
Name: []byte("alice"),
|
Name: []byte("alice"),
|
||||||
|
@ -36,7 +36,7 @@ func MustUnsafeSaveConfStateToBackend(lg *zap.Logger, tx backend.UnsafeWriter, c
|
|||||||
}
|
}
|
||||||
|
|
||||||
// UnsafeConfStateFromBackend retrieves ConfState from the backend.
|
// UnsafeConfStateFromBackend retrieves ConfState from the backend.
|
||||||
// Returns nil if confState in backend is not persisted (e.g. backend writen by <v3.5).
|
// Returns nil if confState in backend is not persisted (e.g. backend written by <v3.5).
|
||||||
func UnsafeConfStateFromBackend(lg *zap.Logger, tx backend.UnsafeReader) *raftpb.ConfState {
|
func UnsafeConfStateFromBackend(lg *zap.Logger, tx backend.UnsafeReader) *raftpb.ConfState {
|
||||||
keys, vals := tx.UnsafeRange(Meta, MetaConfStateName, nil, 0)
|
keys, vals := tx.UnsafeRange(Meta, MetaConfStateName, nil, 0)
|
||||||
if len(keys) == 0 {
|
if len(keys) == 0 {
|
||||||
|
@ -438,7 +438,7 @@ func openWALFiles(lg *zap.Logger, dirpath string, names []string, nameIndex int,
|
|||||||
// exists in the log). Such a situation can happen in cases described in figure 7. of the
|
// exists in the log). Such a situation can happen in cases described in figure 7. of the
|
||||||
// RAFT paper (http://web.stanford.edu/~ouster/cgi-bin/papers/raft-atc14.pdf).
|
// RAFT paper (http://web.stanford.edu/~ouster/cgi-bin/papers/raft-atc14.pdf).
|
||||||
//
|
//
|
||||||
// ReadAll may return uncommitted yet entries, that are subject to be overriden.
|
// ReadAll may return uncommitted yet entries, that are subject to be overridden.
|
||||||
// Do not apply entries that have index > state.commit, as they are subject to change.
|
// Do not apply entries that have index > state.commit, as they are subject to change.
|
||||||
func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb.Entry, err error) {
|
func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb.Entry, err error) {
|
||||||
w.mu.Lock()
|
w.mu.Lock()
|
||||||
|
@ -90,8 +90,8 @@ func TestLeaseGrantAndList(t *testing.T) {
|
|||||||
createdLeases = append(createdLeases, leaseResp.ID)
|
createdLeases = append(createdLeases, leaseResp.ID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Because we're not guarunteed to talk to the same member, wait for
|
// Because we're not guaranteed to talk to the same member, wait for
|
||||||
// listing to eventually return true, either by the result propagaing
|
// listing to eventually return true, either by the result propagating
|
||||||
// or by hitting an up to date member.
|
// or by hitting an up to date member.
|
||||||
var leases []clientv3.LeaseStatus
|
var leases []clientv3.LeaseStatus
|
||||||
require.Eventually(t, func() bool {
|
require.Eventually(t, func() bool {
|
||||||
|
@ -31,7 +31,7 @@ import (
|
|||||||
// See ./tests/integration/clientv3/examples/main_test.go for canonical usage.
|
// See ./tests/integration/clientv3/examples/main_test.go for canonical usage.
|
||||||
// Please notice that the shared (LazyCluster's) state is preserved between
|
// Please notice that the shared (LazyCluster's) state is preserved between
|
||||||
// testcases, so left-over state might has cross-testcase effects.
|
// testcases, so left-over state might has cross-testcase effects.
|
||||||
// Prefer dedicated clusters for substancial test-cases.
|
// Prefer dedicated clusters for substantial test-cases.
|
||||||
|
|
||||||
type LazyCluster interface {
|
type LazyCluster interface {
|
||||||
// EndpointsHTTP - exposes connection points for http endpoints.
|
// EndpointsHTTP - exposes connection points for http endpoints.
|
||||||
|
@ -223,7 +223,7 @@ func TestValidateWatch(t *testing.T) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "create event and update event in seperate requests both with PrevKV()",
|
name: "create event and update event in separate requests both with PrevKV()",
|
||||||
reports: []report.ClientReport{
|
reports: []report.ClientReport{
|
||||||
{
|
{
|
||||||
Watch: []model.WatchOperation{
|
Watch: []model.WatchOperation{
|
||||||
|
@ -97,7 +97,7 @@ Entry types (ConfigChange,IRRCompaction) count is : 5
|
|||||||
```
|
```
|
||||||
#### etcd-dump-logs -stream-decoder <EXECUTABLE_DECODER> [data dir]
|
#### etcd-dump-logs -stream-decoder <EXECUTABLE_DECODER> [data dir]
|
||||||
|
|
||||||
Decode each entry based on logic in the passed decoder. Decoder status and decoded data are listed in separated tab/columns in the ouput. For parsing purpose, the output from decoder are expected to be in format of "<DECODER_STATUS>|<DECODED_DATA>". Please refer to [decoder_correctoutputformat.sh] as an example.
|
Decode each entry based on logic in the passed decoder. Decoder status and decoded data are listed in separated tab/columns in the output. For parsing purpose, the output from decoder are expected to be in format of "<DECODER_STATUS>|<DECODED_DATA>". Please refer to [decoder_correctoutputformat.sh] as an example.
|
||||||
|
|
||||||
However, if the decoder output format is not as expected, "decoder_status" will be "decoder output format is not right, print output anyway", and all output from decoder will be considered as "decoded_data"
|
However, if the decoder output format is not as expected, "decoder_status" will be "decoder output format is not right, print output anyway", and all output from decoder will be considered as "decoded_data"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user