-
Notifications
You must be signed in to change notification settings - Fork 17
WIP: Sharded DB #76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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