-
Notifications
You must be signed in to change notification settings - Fork 16
WIP: Sharded DB #76
base: main
Are you sure you want to change the base?
WIP: Sharded DB #76
Conversation
for _, batch := range rb.batches { | ||
size += batch.Len() | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for _, batch := range rb.batches { | ||
batch.Reset() | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for _, batch := range rb.batches { | ||
if batch.Count() > 0 { | ||
if commitErr := batch.Commit(defaultWriteOpts); commitErr != nil { | ||
err = errors.Join(err, commitErr) | ||
} | ||
} | ||
if closeErr := batch.Close(); closeErr != nil { | ||
err = errors.Join(err, closeErr) | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
database.streamHandler = streamHandler | ||
go database.writeAsyncInBackground() | ||
db.streamHandler = streamHandler | ||
go db.writeAsyncInBackground() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note
for _, storage := range db.storages { | ||
closeErr := storage.Close() | ||
if err == nil && closeErr != nil { | ||
err = closeErr | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for _, storage := range db.storages { | ||
err := storage.Set([]byte(earliestVersionKey), ts[:], defaultWriteOpts) | ||
if err != nil { | ||
return err | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for _, storage := range db.storages { | ||
err := storage.Set([]byte(latestMigratedKeyMetadata), key, defaultWriteOpts) | ||
if err != nil { | ||
return err | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
for _, storage := range db.storages { | ||
err := storage.Set([]byte(latestMigratedModuleMetadata), []byte(module), defaultWriteOpts) | ||
if err != nil { | ||
return err | ||
} | ||
} |
Check warning
Code scanning / CodeQL
Iteration over map Warning
Describe your changes and provide context
Testing performed to validate your change