Skip to content

Commit

Permalink
fix some typos
Browse files Browse the repository at this point in the history
Signed-off-by: thirdkeyword <[email protected]>
  • Loading branch information
thirdkeyword committed Mar 25, 2024
1 parent b643f1b commit fbda591
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion etcdctl/ctlv3/command/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func NewCheckPerfCommand() *cobra.Command {
}

// 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().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.")
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

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"
done
if [[ -n "${duplicates}" ]]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/test_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ if [ "${GET}" != "${VALUE}" ]; then
exit 1
fi

echo "Succesfully tested etcd local image ${TAG}"
echo "Successfully tested etcd local image ${TAG}"

for TARGET_ARCH in "amd64" "arm64" "ppc64le" "s390x"; do
ARCH_TAG=v"${VERSION}"-"${TARGET_ARCH}"
Expand Down
6 changes: 3 additions & 3 deletions scripts/test_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -413,15 +413,15 @@ function run_go_tool {
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 {
log_callout "Making sure everything is committed."
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
fi
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
fi
}
Expand Down
4 changes: 2 additions & 2 deletions server/storage/backend/hooks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ func TestBackendPreCommitHook(t *testing.T) {
// Empty 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()
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) {
Expand Down
4 changes: 2 additions & 2 deletions server/storage/schema/auth_roles_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func TestGetAllRoles(t *testing.T) {
want: []*authpb.Role{{Name: []byte("role2")}},
},
{
name: "Returns data overriden by put",
name: "Returns data overridden by put",
setup: func(tx auth.UnsafeAuthWriter) {
tx.UnsafePutRole(&authpb.Role{
Name: []byte("role1"),
Expand Down Expand Up @@ -179,7 +179,7 @@ func TestGetRole(t *testing.T) {
want: nil,
},
{
name: "Returns data overriden by put",
name: "Returns data overridden by put",
setup: func(tx auth.UnsafeAuthWriter) {
tx.UnsafePutRole(&authpb.Role{
Name: []byte("role1"),
Expand Down
4 changes: 2 additions & 2 deletions server/storage/schema/auth_users_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestGetAllUsers(t *testing.T) {
want: []*authpb.User{{Name: []byte("bob")}},
},
{
name: "Returns data overriden by put",
name: "Returns data overridden by put",
setup: func(tx auth.UnsafeAuthWriter) {
tx.UnsafePutUser(&authpb.User{
Name: []byte("alice"),
Expand Down Expand Up @@ -163,7 +163,7 @@ func TestGetUser(t *testing.T) {
want: nil,
},
{
name: "Returns data overriden by put",
name: "Returns data overridden by put",
setup: func(tx auth.UnsafeAuthWriter) {
tx.UnsafePutUser(&authpb.User{
Name: []byte("alice"),
Expand Down
2 changes: 1 addition & 1 deletion server/storage/schema/confstate.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func MustUnsafeSaveConfStateToBackend(lg *zap.Logger, tx backend.UnsafeWriter, c
}

// 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 {
keys, vals := tx.UnsafeRange(Meta, MetaConfStateName, nil, 0)
if len(keys) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion server/storage/wal/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
// 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.
func (w *WAL) ReadAll() (metadata []byte, state raftpb.HardState, ents []raftpb.Entry, err error) {
w.mu.Lock()
Expand Down
4 changes: 2 additions & 2 deletions tests/common/lease_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ func TestLeaseGrantAndList(t *testing.T) {
createdLeases = append(createdLeases, leaseResp.ID)
}

// Because we're not guarunteed to talk to the same member, wait for
// listing to eventually return true, either by the result propagaing
// Because we're not guaranteed to talk to the same member, wait for
// listing to eventually return true, either by the result propagating
// or by hitting an up to date member.
var leases []clientv3.LeaseStatus
require.Eventually(t, func() bool {
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/lazy_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
// See ./tests/integration/clientv3/examples/main_test.go for canonical usage.
// Please notice that the shared (LazyCluster's) state is preserved between
// 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 {
// EndpointsHTTP - exposes connection points for http endpoints.
Expand Down
2 changes: 1 addition & 1 deletion tests/robustness/validate/validate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
{
Watch: []model.WatchOperation{
Expand Down
2 changes: 1 addition & 1 deletion tools/etcd-dump-logs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Entry types (ConfigChange,IRRCompaction) count is : 5
```
#### 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"

Expand Down

0 comments on commit fbda591

Please sign in to comment.