From 5697cbb183342f3b5f8d1d32d70bafc08f1a91be Mon Sep 17 00:00:00 2001 From: Mahmood Ali Date: Wed, 14 Nov 2018 08:36:14 -0500 Subject: [PATCH] fix comment typos --- nomad/fsm.go | 2 +- nomad/state/state_store.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/nomad/fsm.go b/nomad/fsm.go index f7047337c..6c7ed2e91 100644 --- a/nomad/fsm.go +++ b/nomad/fsm.go @@ -519,7 +519,7 @@ func (n *nomadFSM) applyBatchDeregisterJob(buf []byte, index uint64) interface{} panic(fmt.Errorf("failed to decode request: %v", err)) } - // Perform all store updates atomically to ensure a consistent views for store readers. + // Perform all store updates atomically to ensure a consistent view for store readers. // A partial update may increment the snapshot index, allowing eval brokers to process // evals for jobs whose deregistering didn't get committed yet. err := n.state.WithWriteTransaction(func(tx state.Txn) error { diff --git a/nomad/state/state_store.go b/nomad/state/state_store.go index 26beab4d8..da5987301 100644 --- a/nomad/state/state_store.go +++ b/nomad/state/state_store.go @@ -927,7 +927,7 @@ func (s *StateStore) UpsertJob(index uint64, job *structs.Job) error { } // UpsertJobTxn is used to register a job or update a job definition, like UpsertJob, -// but in a transcation. Useful for when making multiple modifications atomically +// but in a transaction. Useful for when making multiple modifications atomically func (s *StateStore) UpsertJobTxn(index uint64, job *structs.Job, txn Txn) error { return s.upsertJobImpl(index, job, false, txn) } @@ -1023,7 +1023,7 @@ func (s *StateStore) DeleteJob(index uint64, namespace, jobID string) error { } // DeleteJobTxn is used to deregister a job, like DeleteJob, -// but in a transcation. Useful for when making multiple modifications atomically +// but in a transaction. Useful for when making multiple modifications atomically func (s *StateStore) DeleteJobTxn(index uint64, namespace, jobID string, txn Txn) error { // COMPAT 0.7: Upgrade old objects that do not have namespaces if namespace == "" { @@ -1542,7 +1542,7 @@ func (s *StateStore) DeletePeriodicLaunch(index uint64, namespace, jobID string) } // DeletePeriodicLaunchTxn is used to delete the periodic launch, like DeletePeriodicLaunch -// but in a transcation. Useful for when making multiple modifications atomically +// but in a transaction. Useful for when making multiple modifications atomically func (s *StateStore) DeletePeriodicLaunchTxn(index uint64, namespace, jobID string, txn Txn) error { // COMPAT 0.7: Upgrade old objects that do not have namespaces if namespace == "" { @@ -1620,7 +1620,7 @@ func (s *StateStore) UpsertEvals(index uint64, evals []*structs.Evaluation) erro } // UpsertEvals is used to upsert a set of evaluations, like UpsertEvals -// but in a transcation. Useful for when making multiple modifications atomically +// but in a transaction. Useful for when making multiple modifications atomically func (s *StateStore) UpsertEvalsTxn(index uint64, evals []*structs.Evaluation, txn Txn) error { // Do a nested upsert jobs := make(map[structs.NamespacedID]string, len(evals))