-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add Raw Import and Raw Batch for Writing to SS in any order of version #68
Conversation
ss/pebbledb/db.go
Outdated
go func() { | ||
defer close(rawCh) | ||
for entry := range ch { | ||
rawCh <- types.GetRawSnapshotNode(entry, version) | ||
} | ||
}() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note
go func() { | ||
for i := 0; i < 10; i++ { | ||
ch <- types.SnapshotNode{ | ||
StoreKey: "store1", | ||
Key: []byte(fmt.Sprintf("key%03d", i)), | ||
Value: []byte(fmt.Sprintf("value%03d", i)), | ||
} | ||
} | ||
close(ch) | ||
}() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note test
ss/test/storage_test_suite.go
Outdated
go func(i int) { | ||
defer wg.Done() // Decrement the counter when the goroutine completes | ||
ch <- types.RawSnapshotNode{ | ||
StoreKey: "store1", | ||
Key: []byte(fmt.Sprintf("key%03d", i)), | ||
Value: []byte(fmt.Sprintf("value%03d", i)), | ||
Version: int64(i + 1), | ||
} | ||
}(i) |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note test
go func() { | ||
wg.Wait() | ||
close(ch) | ||
}() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note test
go func(i int) { | ||
defer wg.Done() | ||
ch <- types.RawSnapshotNode{ | ||
StoreKey: "store1", | ||
Key: []byte(fmt.Sprintf("key%03d", i)), | ||
Value: []byte(fmt.Sprintf("value%03d", i)), | ||
Version: int64(i + 1), | ||
} | ||
}(i) |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note test
go func() { | ||
wg.Wait() | ||
close(ch) | ||
}() |
Check notice
Code scanning / CodeQL
Spawning a Go routine Note test
Describe your changes and provide context
RawImport
andRawBatch
which allows importing in kv entries in any order of versionTesting performed to validate your change
RawImport
andImport
Import
to useRawImport
), verifying on new cluster