Skip to content

Commit

Permalink
[no-release-notes] Merge pull request #8289
Browse files Browse the repository at this point in the history
Spelling and grammar fixes from outside contributor.
  • Loading branch information
macneale4 authored Aug 21, 2024
2 parents 9785565 + 34bd5c0 commit 16866de
Show file tree
Hide file tree
Showing 68 changed files with 108 additions and 108 deletions.
2 changes: 1 addition & 1 deletion go/cmd/dolt/cli/messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package cli
// This is a starting point for storing common messages. Doing this correctly would probably mean using language files
// but that is overkill for the moment.
const (
// Single variable - the name of the command. `dolt <command>` is how the commandString is formated in calls to the Exec method
// Single variable - the name of the command. `dolt <command>` is how the commandString is formatted in calls to the Exec method
// for dolt commands.
RemoteUnsupportedMsg = "%s can not currently be used when there is a local server running. Please stop your dolt sql-server or connect using `dolt sql` instead."
)
2 changes: 1 addition & 1 deletion go/cmd/dolt/commands/assist.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func extractJsonResponse(content string) map[string]interface{} {
}

func sqlQuery(ctx context.Context, query string) (string, bool, error) {
cli.Println(fmt.Sprintf("Runnning query \"%s\"...", query))
cli.Println(fmt.Sprintf("Running query \"%s\"...", query))

output, _, err := doltExec(ctx, fmt.Sprintf("dolt sql -q \"%s\"", query), false)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion go/cmd/dolt/commands/branch.go
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ func generateForceDeleteMessage(args []string) string {
return newArgs
}

// callStoredProcedure generates and exectures the SQL query for calling the DOLT_BRANCH stored procedure.
// callStoredProcedure generates and executes the SQL query for calling the DOLT_BRANCH stored procedure.
// All actions that modify branches delegate to this after they validate their arguments.
// Actions that don't modify branches, such as `dolt branch --list` and `dolt branch --show-current`, don't call
// this method.
Expand Down
2 changes: 1 addition & 1 deletion go/cmd/dolt/commands/clone.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func validateAndParseDolthubUrl(urlStr string) (string, bool) {
}

if u.Scheme == dbfactory.HTTPSScheme && u.Host == "www.dolthub.com" {
// Get the actual repo name and covert the remote
// Get the actual repo name and convert the remote
split := strings.Split(u.Path, "/")

if len(split) > 2 {
Expand Down
2 changes: 1 addition & 1 deletion go/cmd/dolt/commands/diff_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ func (s sqlDiffWriter) RowWriter(fromTableInfo, toTableInfo *diff.TableInfo, tds
targetSch = fromTableInfo.Sch
}

// TOOD: schema names
// TODO: schema names
return sqlexport.NewSqlDiffWriter(tds.ToTableName.Name, targetSch, iohelp.NopWrCloser(cli.CliOut)), nil
}

Expand Down
4 changes: 2 additions & 2 deletions go/cmd/dolt/commands/sqlserver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -800,7 +800,7 @@ func persistServerLocalCreds(port int, dEnv *env.DoltEnv) (*LocalCreds, error) {

// remotesapiAuth facilitates the implementation remotesrv.AccessControl for the remotesapi server.
type remotesapiAuth struct {
// ctxFactory is a function that returns a new sql.Context. This will create a new conext every time it is called,
// ctxFactory is a function that returns a new sql.Context. This will create a new context every time it is called,
// so it should be called once per API request.
ctxFactory func(context.Context) (*sql.Context, error)
rawDb *mysql_db.MySQLDb
Expand All @@ -827,7 +827,7 @@ func (r *remotesapiAuth) ApiAuthenticate(ctx context.Context) (context.Context,
if strings.Index(address, ":") > 0 {
address, _, err = net.SplitHostPort(creds.Address)
if err != nil {
return nil, fmt.Errorf("Invlaid Host string for authentication: %s", creds.Address)
return nil, fmt.Errorf("Invalid Host string for authentication: %s", creds.Address)
}
}

Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/doltdb/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var ErrNoConflictsResolved = errors.New("no conflicts resolved")

const dolt_row_hash_tag = 0

// IsValidTableName checks if name is a valid identifer, and doesn't end with space characters
// IsValidTableName checks if name is a valid identifier, and doesn't end with space characters
func IsValidTableName(name string) bool {
if len(name) == 0 || unicode.IsSpace(rune(name[len(name)-1])) {
return false
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/dtestutils/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func RowsAndSchema() ([]row.Row, schema.Schema, error) {
return rows, sch, err
}

// MustTuple contructs a types.Tuple for a slice of types.Values.
// MustTuple constructs a types.Tuple for a slice of types.Values.
func MustTuple(vals ...types.Value) types.Tuple {
tup, err := types.NewTuple(types.Format_Default, vals...)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/env/multi_repo_env.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func GetMultiEnvStorageMetadata(dataDirFS filesys.Filesys) (StorageMetadataMap,
return sms, nil
}

// NewMultiEnv returns a new MultiRepoEnv instance dirived from a root DoltEnv instance.
// NewMultiEnv returns a new MultiRepoEnv instance derived from a root DoltEnv instance.
func MultiEnvForSingleEnv(ctx context.Context, env *DoltEnv) (*MultiRepoEnv, error) {
return MultiEnvForDirectory(ctx, env.Config.WriteableConfig(), env.FS, env.Version, env)
}
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/merge/merge_prolly_rows.go
Original file line number Diff line number Diff line change
Expand Up @@ -1209,7 +1209,7 @@ func resolveDefaults(ctx *sql.Context, tableName string, mergedSchema schema.Sch
return nil, err
}

// The default expresions always come in the order of the merged schema, but the fields we need to apply them to
// The default expressions always come in the order of the merged schema, but the fields we need to apply them to
// might have different column indexes in the case of a schema change
if len(exprs) > 0 {
for i := range exprs {
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/merge/mutable_secondary_index.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func GetMutableSecondaryIdxsWithPending(ctx *sql.Context, ourSch, sch schema.Sch
// If the schema has changed, don't reuse the index.
// TODO: This isn't technically required, but correctly handling updating secondary indexes when only some
// of the table's rows have been updated is difficult to get right.
// Dropping the index is potentially slower but guarenteed to be correct.
// Dropping the index is potentially slower but guaranteed to be correct.
if !m.KeyDesc().Equals(index.Schema().GetKeyDescriptorWithNoConversion()) {
continue
}
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/rebase/filter_branch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func filterBranchTests() []filterBranchTest {
asserts: []testAssertion{
{
setup: []testCommand{
// expeced error: "table not found: test"
// expected error: "table not found: test"
{cmd.FilterBranchCmd{}, args{"--continue", "-q", "DELETE FROM test WHERE pk > 1;"}},
},
},
Expand Down
8 changes: 4 additions & 4 deletions go/libraries/doltcore/remotestorage/chunk_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (

// A remotestorage.ChunkFetcher is a pipelined chunk fetcher for fetching a
// large number of chunks where the downloads may benefit from range
// coallescing, hedging, automatic retries, pipelining of download location
// coalescing, hedging, automatic retries, pipelining of download location
// retrieval with the fetching of the actual chunk bytes, etc.
//
// It is expected that one goroutine will be calling `Get()` with batches of
Expand Down Expand Up @@ -392,7 +392,7 @@ func fetcherDownloadRangesThread(ctx context.Context, locCh chan []*remotesapi.D
// |toSend| could have come from a previous iteration
// of this loop or the outer loop. If it's |nil|, we
// can get the next range to download from
// |downlaods.ranges|.
// |downloads.ranges|.
if toSend == nil {
max := downloads.ranges.DeleteMaxRegion()
if len(max) == 0 {
Expand Down Expand Up @@ -486,9 +486,9 @@ type SizeSetter interface {

// This does additive increase, multiplicative decrease on calls to |SetSize|,
// reading successes and failures from calls to |RecordSuccess| and
// |RecordFailure|. If there have been any faliures in the last update window,
// |RecordFailure|. If there have been any failures in the last update window,
// it will call |SetSize| with a new size that's 1/2 the current size. If there
// have been no faliures in the last update window, but there has been at least
// have been no failures in the last update window, but there has been at least
// one success, it will call |SetSize| with a size 1 greater than the current
// size. Will not scale size greater than |MaxConcurrency|.
func (cc *ConcurrencyControl) Run(ctx context.Context, done <-chan struct{}, ss SizeSetter, sz int) error {
Expand Down
36 changes: 18 additions & 18 deletions go/libraries/doltcore/remotestorage/internal/ranges/ranges.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ type GetRange struct {
// A |Region| represents a continuous range of bytes within in a Url.
// |ranges.Tree| maintains |Region| instances that cover every |GetRange|
// within the tree. As entries are inserted into the Tree, their Regions can
// coallesce with Regions which come before or after them in the same Url,
// based on the |coallesceLimit|.
// coalesce with Regions which come before or after them in the same Url,
// based on the |coalesceLimit|.
//
// |Region|s are maintained in a |RegionHeap| so that the |Tree| can quickly
// return a large download to get started on when a download worker is
Expand Down Expand Up @@ -103,11 +103,11 @@ func (rh *RegionHeap) Pop() any {
}

// A ranges.Tree is a tree data structure designed to support efficient
// coallescing of non-overlapping ranges inserted into it.
// coalescing of non-overlapping ranges inserted into it.
type Tree struct {
t *btree.BTreeG[*GetRange]
regions *RegionHeap
coallesceLimit int
t *btree.BTreeG[*GetRange]
regions *RegionHeap
coalesceLimit int
}

func GetRangeLess(a, b *GetRange) bool {
Expand All @@ -118,11 +118,11 @@ func GetRangeLess(a, b *GetRange) bool {
}
}

func NewTree(coallesceLimit int) *Tree {
func NewTree(coalesceLimit int) *Tree {
return &Tree{
t: btree.NewG[*GetRange](64, GetRangeLess),
regions: &RegionHeap{},
coallesceLimit: coallesceLimit,
t: btree.NewG[*GetRange](64, GetRangeLess),
regions: &RegionHeap{},
coalesceLimit: coalesceLimit,
}
}

Expand Down Expand Up @@ -154,21 +154,21 @@ func (t *Tree) Insert(url string, hash []byte, offset uint64, length uint32) {
}
t.t.ReplaceOrInsert(ins)

// Check for coallesce with the range of the entry before the new one...
// Check for coalesce with the range of the entry before the new one...
t.t.DescendLessOrEqual(ins, func(gr *GetRange) bool {
if gr == ins {
return true
}
// If we coallesce...
// If we coalesce...
if ins.Url == gr.Url {
regionEnd := gr.Region.EndOffset
if regionEnd > ins.Offset {
// Inserted entry is already contained in the prior region.
ins.Region = gr.Region
ins.Region.MatchedBytes += uint64(ins.Length)
heap.Fix(t.regions, ins.Region.HeapIndex)
} else if (ins.Offset - regionEnd) < uint64(t.coallesceLimit) {
// Inserted entry is within the limit to coallesce with the prior one.
} else if (ins.Offset - regionEnd) < uint64(t.coalesceLimit) {
// Inserted entry is within the limit to coalesce with the prior one.
ins.Region = gr.Region
ins.Region.MatchedBytes += uint64(ins.Length)
ins.Region.EndOffset = ins.Offset + uint64(ins.Length)
Expand All @@ -183,10 +183,10 @@ func (t *Tree) Insert(url string, hash []byte, offset uint64, length uint32) {
if gr == ins {
return true
}
// If we coallesce...
// If we coalesce...
if ins.Url == gr.Url && gr.Region != ins.Region {
regionStart := gr.Region.StartOffset
if regionStart < (ins.Offset + uint64(ins.Length) + uint64(t.coallesceLimit)) {
if regionStart < (ins.Offset + uint64(ins.Length) + uint64(t.coalesceLimit)) {
if ins.Region == nil {
ins.Region = gr.Region
ins.Region.MatchedBytes += uint64(ins.Length)
Expand Down Expand Up @@ -216,7 +216,7 @@ func (t *Tree) Insert(url string, hash []byte, offset uint64, length uint32) {
return false
})

// We didn't coallesce with any existing Regions. Insert a new Region
// We didn't coalesce with any existing Regions. Insert a new Region
// covering just this GetRange.
if ins.Region == nil {
ins.Region = &Region{
Expand All @@ -233,7 +233,7 @@ func (t *Tree) Insert(url string, hash []byte, offset uint64, length uint32) {
// Returns all the |*GetRange| entries in the tree that are encompassed by the
// current top entry in our |RegionHeap|. For |HeapStrategy_largest|, this will
// be the largest possible download we can currently start, given our
// |coallesceLimit|.
// |coalesceLimit|.
func (t *Tree) DeleteMaxRegion() []*GetRange {
if t.regions.Len() == 0 {
return nil
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
//
// Close should always be called on an reliable.Chan to ensure resource cleanup.
type Chan[T any] struct {
// All unack'd |T|s are stored in |buff|. As they get Ackd, they get poped from here.
// All unack'd |T|s are stored in |buff|. As they get Ackd, they get popped from here.
buff *circular.Buff[T]

// We return new |T|s from here and they go into |buff| to be delivered
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func newBinlogStreamer() *binlogStreamer {
}

// startStream listens for new binlog events sent to this streamer over its binlog event
// channel and sends them over |conn|. It also listens for ticker ticks to send hearbeats
// channel and sends them over |conn|. It also listens for ticker ticks to send heartbeats
// over |conn|. The specified |binlogFormat| is used to define the format of binlog events
// and |binlogEventMeta| records the position of the stream. This method blocks until an error
// is received over the stream (e.g. the connection closing) or the streamer is closed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func (r *branchControlReplica) Run() {
r.progressNotifier.RecordSuccess(attempt)
r.fastFailReplicationWait = false
r.backoff.Reset()
r.lgr.Debugf("branchControlReplica[%s]: sucessfully replicated branch control permissions.", r.client.remote)
r.lgr.Debugf("branchControlReplica[%s]: successfully replicated branch control permissions.", r.client.remote)
r.replicatedVersion = version
}
}
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/sqle/cluster/mysqldb_persister.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (r *mysqlDbReplica) Run() {
r.progressNotifier.RecordSuccess(attempt)
r.fastFailReplicationWait = false
r.backoff.Reset()
r.lgr.Debugf("mysqlDbReplica[%s]: sucessfully replicated users and grants at version %d.", r.client.remote, version)
r.lgr.Debugf("mysqlDbReplica[%s]: successfully replicated users and grants at version %d.", r.client.remote, version)
r.replicatedVersion = version
} else {
r.lgr.Debugf("mysqlDbReplica[%s]: not replicating empty users and grants at version %d.", r.client.remote, r.version)
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/sqle/dprocedures/dolt_rebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func startRebase(ctx *sql.Context, upstreamPoint string, commitBecomesEmptyHandl
}

// rebaseWorkingBranch is the name of the temporary branch used when performing a rebase. In Git, a rebase
// happens with a detatched HEAD, but Dolt doesn't support that, we use a temporary branch.
// happens with a detached HEAD, but Dolt doesn't support that, we use a temporary branch.
rebaseWorkingBranch := "dolt_rebase_" + rebaseBranch
var rsc doltdb.ReplicationStatusController
err = actions.CreateBranchWithStartPt(ctx, dbData, rebaseWorkingBranch, upstreamPoint, false, &rsc)
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/sqle/enginetest/dolt_queries.go
Original file line number Diff line number Diff line change
Expand Up @@ -7035,7 +7035,7 @@ END`,
},
},
{
Name: "Database syntax propogates to inner calls",
Name: "Database syntax propagates to inner calls",
SetUpScript: []string{
"CALL DOLT_CHECKOUT('main');",
`CREATE PROCEDURE p4()
Expand Down
6 changes: 3 additions & 3 deletions go/libraries/doltcore/sqle/enginetest/dolt_queries_merge.go
Original file line number Diff line number Diff line change
Expand Up @@ -3817,7 +3817,7 @@ var SchemaConflictScripts = []queries.ScriptTest{
SetUpScript: []string{
"set @@autocommit=1;",
"create table t (pk int primary key, c0 varchar(20))",
"call dolt_commit('-Am', 'added tabele t')",
"call dolt_commit('-Am', 'added table t')",
"call dolt_checkout('-b', 'other')",
"alter table t modify column c0 int",
"call dolt_commit('-am', 'altered t on branch other')",
Expand Down Expand Up @@ -3845,7 +3845,7 @@ var SchemaConflictScripts = []queries.ScriptTest{
SetUpScript: []string{
"set @@autocommit=0;",
"create table t (pk int primary key, c0 varchar(20))",
"call dolt_commit('-Am', 'added tabele t')",
"call dolt_commit('-Am', 'added table t')",
"call dolt_checkout('-b', 'other')",
"alter table t modify column c0 int",
"call dolt_commit('-am', 'altered t on branch other')",
Expand Down Expand Up @@ -4012,7 +4012,7 @@ var OldFormatMergeConflictsAndCVsScripts = []queries.ScriptTest{
},
{
Query: "CALL DOLT_MERGE('branch3');",
Expected: []sql.Row{{"", 0, 1, "conficts found"}},
Expected: []sql.Row{{"", 0, 1, "conflicts found"}},
},
{
Query: "SELECT violation_type, pk, parent_fk from dolt_constraint_violations_child;",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type AutoIncrementTracker interface {
// given, so the new global maximum is computed without regard for its value in that working set.
Set(ctx *sql.Context, tableName string, table *doltdb.Table, ws ref.WorkingSetRef, newAutoIncVal uint64) (*doltdb.Table, error)

// AcquireTableLock acquires the auto increment lock on a table, and reutrns a callback function to release the lock.
// AcquireTableLock acquires the auto increment lock on a table, and returns a callback function to release the lock.
// Depending on the value of the `innodb_autoinc_lock_mode` system variable, the engine may need to acquire and hold
// the lock for the duration of an insert statement.
AcquireTableLock(ctx *sql.Context, tableName string) (func(), error)
Expand Down
4 changes: 2 additions & 2 deletions go/libraries/doltcore/sqle/json/noms_json_value_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,15 @@ func TestJSONValueMarshallingRoundTrip(t *testing.T) {
doc: gmstypes.MustJSON(`2.71`),
},
{
name: "type homogenous object",
name: "type homogeneous object",
doc: gmstypes.MustJSON(`{"a": 2, "b": 3, "c": 4}`),
},
{
name: "type heterogeneous object",
doc: gmstypes.MustJSON(`{"a": 2, "b": "two", "c": false}`),
},
{
name: "homogenous array",
name: "homogeneous array",
doc: gmstypes.MustJSON(`[1, 2, 3]`),
},
{
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/sqle/statspro/auto_refresh.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (p *Provider) checkRefresh(ctx *sql.Context, sqlDb sql.Database, dbName, br
ctx.GetLogger().Debugf("statistics updating: %s", updateMeta.qual)
// mark index for updating
idxMetas = append(idxMetas, updateMeta)
// update lastest hash if we haven't already
// update latest hash if we haven't already
statDb.SetLatestHash(branch, table, tableHash)
}
}
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/doltcore/table/inmem_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func mustRow(r row.Row, err error) row.Row {
}

// These are in noms-key-sorted order, since InMemoryTable.AppendRow sorts its rows. This should probably be done
// programatically instead of hard-coded.
// programmatically instead of hard-coded.
var rows = []row.Row{
mustRow(row.New(types.Format_Default, rowSch, row.TaggedValues{
nameTag: types.String("Bill Billerson"),
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/events/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewCounter(metricID eventsapi.MetricID) *Counter {
return &Counter{0, metricID}
}

// Inc incements a counter. This method happens atomically.
// Inc increments a counter. This method happens atomically.
func (c *Counter) Inc() {
c.Add(1)
}
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/utils/argparser/args_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func TestDropValue(t *testing.T) {
}

newApr2 := apr.DropValue("flag")
require.NotEqualf(t, apr, newApr2, "DropValue failes to drop flag")
require.NotEqualf(t, apr, newApr2, "DropValue fails to drop flag")

_, hasVal = newApr2.GetValue("string")
if !hasVal {
Expand Down
2 changes: 1 addition & 1 deletion go/libraries/utils/concurrentmap/concurrentmap_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func TestConcurrentMapIter(t *testing.T) {
t.Errorf("Iter failed, expected to iterate 3 times, iterated %d times", counter)
}

// Test that iteration yeilds all elements
// Test that iteration yields all elements
if len(elements) != 3 {
t.Errorf("Iter failed, there should be 3 elements in the map, got %d", len(elements))
}
Expand Down
Loading

0 comments on commit 16866de

Please sign in to comment.