[#242] node: Add tracing spans
Add tracing spans for PUT requests. Add tracing spans for DELETE requests. Add tracing spans for SELECT requests. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
200fc8b882
commit
d62c6e4ce6
122 changed files with 863 additions and 417 deletions
|
@ -44,6 +44,7 @@ func TestShardReload(t *testing.T) {
|
|||
meta.WithEpochState(epochState{})}
|
||||
|
||||
opts := []Option{
|
||||
WithID(NewIDFromBytes([]byte{})),
|
||||
WithLogger(l),
|
||||
WithBlobStorOptions(blobOpts...),
|
||||
WithMetaBaseOptions(metaOpts...),
|
||||
|
@ -75,7 +76,7 @@ func TestShardReload(t *testing.T) {
|
|||
checkHasObjects(t, true)
|
||||
|
||||
t.Run("same config, no-op", func(t *testing.T) {
|
||||
require.NoError(t, sh.Reload(opts...))
|
||||
require.NoError(t, sh.Reload(context.Background(), opts...))
|
||||
checkHasObjects(t, true)
|
||||
})
|
||||
|
||||
|
@ -86,7 +87,7 @@ func TestShardReload(t *testing.T) {
|
|||
}
|
||||
|
||||
newOpts := newShardOpts(filepath.Join(p, "meta1"), false)
|
||||
require.NoError(t, sh.Reload(newOpts...))
|
||||
require.NoError(t, sh.Reload(context.Background(), newOpts...))
|
||||
|
||||
checkHasObjects(t, false) // new path, but no resync
|
||||
|
||||
|
@ -97,7 +98,7 @@ func TestShardReload(t *testing.T) {
|
|||
})
|
||||
|
||||
newOpts = newShardOpts(filepath.Join(p, "meta2"), true)
|
||||
require.NoError(t, sh.Reload(newOpts...))
|
||||
require.NoError(t, sh.Reload(context.Background(), newOpts...))
|
||||
|
||||
checkHasObjects(t, true) // all objects are restored, including the new one
|
||||
|
||||
|
@ -106,7 +107,7 @@ func TestShardReload(t *testing.T) {
|
|||
require.NoError(t, os.WriteFile(badPath, []byte{1}, 0))
|
||||
|
||||
newOpts = newShardOpts(badPath, true)
|
||||
require.Error(t, sh.Reload(newOpts...))
|
||||
require.Error(t, sh.Reload(context.Background(), newOpts...))
|
||||
|
||||
// Cleanup is done, no panic.
|
||||
obj := newObject()
|
||||
|
@ -117,7 +118,7 @@ func TestShardReload(t *testing.T) {
|
|||
|
||||
// Successive reload produces no undesired effects.
|
||||
require.NoError(t, os.RemoveAll(badPath))
|
||||
require.NoError(t, sh.Reload(newOpts...))
|
||||
require.NoError(t, sh.Reload(context.Background(), newOpts...))
|
||||
|
||||
obj = newObject()
|
||||
require.NoError(t, putObject(sh, obj))
|
||||
|
@ -132,7 +133,7 @@ func putObject(sh *Shard, obj *objectSDK.Object) error {
|
|||
var prm PutPrm
|
||||
prm.SetObject(obj)
|
||||
|
||||
_, err := sh.Put(prm)
|
||||
_, err := sh.Put(context.Background(), prm)
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue