Skip to content

Commit

Permalink
Fix misspell warnings. (hypermodeinc#986)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinmr authored Aug 19, 2019
1 parent 7a7dd17 commit 6a7fb6c
Show file tree
Hide file tree
Showing 9 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions db.go
Original file line number Diff line number Diff line change
Expand Up @@ -897,8 +897,8 @@ func (db *DB) handleFlushTask(ft flushTask) error {
go func() { dirSyncCh <- syncDir(db.opt.Dir) }()

bopts := table.Options{
BlockSize: db.opt.BlockSize,
BloomFalsePostive: db.opt.BloomFalsePositive,
BlockSize: db.opt.BlockSize,
BloomFalsePositive: db.opt.BloomFalsePositive,
}
err = writeLevel0Table(ft, fd, bopts)
dirSyncErr := <-dirSyncCh
Expand Down
4 changes: 2 additions & 2 deletions db2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,8 @@ func addToManifest(t *testing.T, db *DB, tab *table.Table, level uint32) {
// a table with key starting from start and ending with end.
func createTableWithRange(t *testing.T, db *DB, start, end int) *table.Table {
bopts := table.Options{
BlockSize: db.opt.BlockSize,
BloomFalsePostive: db.opt.BloomFalsePositive,
BlockSize: db.opt.BlockSize,
BloomFalsePositive: db.opt.BloomFalsePositive,
}
b := table.NewTableBuilder(bopts)
nums := []int{start, end}
Expand Down
4 changes: 2 additions & 2 deletions levels.go
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,8 @@ func (s *levelsController) compactBuildTables(
for it.Valid() {
timeStart := time.Now()
bopts := table.Options{
BlockSize: s.kv.opt.BlockSize,
BloomFalsePostive: s.kv.opt.BloomFalsePositive,
BlockSize: s.kv.opt.BlockSize,
BloomFalsePositive: s.kv.opt.BloomFalsePositive,
}
builder := table.NewTableBuilder(bopts)
var numKeys, numSkips uint64
Expand Down
2 changes: 1 addition & 1 deletion manifest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func buildTestTable(t *testing.T, prefix string, n int) *os.File {
// TODO - Move these to somewhere where table package can also use it.
// keyValues is n by 2 where n is number of pairs.
func buildTable(t *testing.T, keyValues [][]string) *os.File {
bopts := table.Options{BlockSize: 4 * 1024, BloomFalsePostive: 0.01}
bopts := table.Options{BlockSize: 4 * 1024, BloomFalsePositive: 0.01}
b := table.NewTableBuilder(bopts)
defer b.Close()
// TODO: Add test for file garbage collection here. No files should be left after the tests here.
Expand Down
10 changes: 5 additions & 5 deletions stream_writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (sw *StreamWriter) Prepare() error {
}

// Write writes KVList to DB. Each KV within the list contains the stream id which StreamWriter
// would use to demux the writes. Write is thread safe and can be called concurrently by mulitple
// would use to demux the writes. Write is thread safe and can be called concurrently by multiple
// goroutines.
func (sw *StreamWriter) Write(kvs *pb.KVList) error {
if len(kvs.GetKv()) == 0 {
Expand Down Expand Up @@ -208,8 +208,8 @@ type sortedWriter struct {

func (sw *StreamWriter) newWriter(streamId uint32) *sortedWriter {
bopts := table.Options{
BlockSize: sw.db.opt.BlockSize,
BloomFalsePostive: sw.db.opt.BloomFalsePositive,
BlockSize: sw.db.opt.BlockSize,
BloomFalsePositive: sw.db.opt.BloomFalsePositive,
}
w := &sortedWriter{
db: sw.db,
Expand Down Expand Up @@ -303,8 +303,8 @@ func (w *sortedWriter) send() error {
}(w.builder)

bopts := table.Options{
BlockSize: w.db.opt.BlockSize,
BloomFalsePostive: w.db.opt.BloomFalsePositive,
BlockSize: w.db.opt.BlockSize,
BloomFalsePositive: w.db.opt.BloomFalsePositive,
}
w.builder = table.NewTableBuilder(bopts)
return nil
Expand Down
2 changes: 1 addition & 1 deletion table/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ The table structure looks like
+---------+------------+-----------+---------------+
*/
func (b *Builder) Finish() []byte {
bf := z.NewBloomFilter(float64(len(b.keyHashes)), b.opt.BloomFalsePostive)
bf := z.NewBloomFilter(float64(len(b.keyHashes)), b.opt.BloomFalsePositive)
for _, h := range b.keyHashes {
bf.Add(h)
}
Expand Down
2 changes: 1 addition & 1 deletion table/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func TestTableIndex(t *testing.T) {

t.Run("multiple keys", func(t *testing.T) {
keysCount := 10000
opts := Options{BlockSize: 4 * 1024, BloomFalsePostive: 0.01}
opts := Options{BlockSize: 4 * 1024, BloomFalsePositive: 0.01}
builder := NewTableBuilder(opts)
filename := fmt.Sprintf("%s%c%d.sst", os.TempDir(), os.PathSeparator, rand.Int63())
f, err := y.OpenSyncedFile(filename, true)
Expand Down
4 changes: 2 additions & 2 deletions table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ type Options struct {

// Options for Table builder.

// BloomFalsePostive is the false postive probabiltiy of bloom filter.
BloomFalsePostive float64
// BloomFalsePositive is the false positive probabiltiy of bloom filter.
BloomFalsePositive float64

// BlockSize is the size of each block inside SSTable in bytes.
BlockSize int
Expand Down
10 changes: 5 additions & 5 deletions table/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func buildTestTable(t *testing.T, prefix string, n int) *os.File {

// keyValues is n by 2 where n is number of pairs.
func buildTable(t *testing.T, keyValues [][]string) *os.File {
opts := Options{BlockSize: 4 * 1024, BloomFalsePostive: 0.01}
opts := Options{BlockSize: 4 * 1024, BloomFalsePositive: 0.01}
b := NewTableBuilder(opts)
defer b.Close()
rand.Seed(time.Now().UnixNano())
Expand Down Expand Up @@ -658,7 +658,7 @@ func TestTableBigValues(t *testing.T) {
require.NoError(t, err, "unable to create file")

n := 100 // Insert 100 keys.
opts := Options{BlockSize: 4 * 1024, BloomFalsePostive: 0.01}
opts := Options{BlockSize: 4 * 1024, BloomFalsePositive: 0.01}
builder := NewTableBuilder(opts)
for i := 0; i < n; i++ {
key := y.KeyWithTs([]byte(key("", i)), 0)
Expand Down Expand Up @@ -729,7 +729,7 @@ func BenchmarkReadAndBuild(b *testing.B) {
// Iterate b.N times over the entire table.
for i := 0; i < b.N; i++ {
func() {
opts := Options{BlockSize: 4 * 0124, BloomFalsePostive: 0.01}
opts := Options{BlockSize: 4 * 0124, BloomFalsePositive: 0.01}
newBuilder := NewTableBuilder(opts)
it := tbl.NewIterator(false)
defer it.Close()
Expand All @@ -750,7 +750,7 @@ func BenchmarkReadMerged(b *testing.B) {
var tables []*Table
for i := 0; i < m; i++ {
filename := fmt.Sprintf("%s%s%d.sst", os.TempDir(), string(os.PathSeparator), rand.Int63())
opts := Options{BlockSize: 4 * 1024, BloomFalsePostive: 0.01}
opts := Options{BlockSize: 4 * 1024, BloomFalsePositive: 0.01}
builder := NewTableBuilder(opts)
f, err := y.OpenSyncedFile(filename, true)
y.Check(err)
Expand Down Expand Up @@ -836,7 +836,7 @@ func BenchmarkRandomRead(b *testing.B) {

func getTableForBenchmarks(b *testing.B, count int) *Table {
rand.Seed(time.Now().Unix())
opts := Options{BlockSize: 4 * 1024, BloomFalsePostive: 0.01}
opts := Options{BlockSize: 4 * 1024, BloomFalsePositive: 0.01}
builder := NewTableBuilder(opts)
filename := fmt.Sprintf("%s%s%d.sst", os.TempDir(), string(os.PathSeparator), rand.Int63())
f, err := y.OpenSyncedFile(filename, true)
Expand Down

0 comments on commit 6a7fb6c

Please sign in to comment.