[#1412] metabase: Drop logging inside transaction
All checks were successful
DCO action / DCO (pull_request) Successful in 1m13s
Tests and linters / Run gofumpt (pull_request) Successful in 1m29s
Vulncheck / Vulncheck (pull_request) Successful in 2m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m10s
Build / Build Components (pull_request) Successful in 2m22s
Tests and linters / gopls check (pull_request) Successful in 2m36s
Tests and linters / Staticcheck (pull_request) Successful in 3m14s
Tests and linters / Lint (pull_request) Successful in 3m31s
Tests and linters / Tests (pull_request) Successful in 4m16s
Tests and linters / Tests with -race (pull_request) Successful in 5m55s
All checks were successful
DCO action / DCO (pull_request) Successful in 1m13s
Tests and linters / Run gofumpt (pull_request) Successful in 1m29s
Vulncheck / Vulncheck (pull_request) Successful in 2m0s
Pre-commit hooks / Pre-commit (pull_request) Successful in 2m10s
Build / Build Components (pull_request) Successful in 2m22s
Tests and linters / gopls check (pull_request) Successful in 2m36s
Tests and linters / Staticcheck (pull_request) Successful in 3m14s
Tests and linters / Lint (pull_request) Successful in 3m31s
Tests and linters / Tests (pull_request) Successful in 4m16s
Tests and linters / Tests with -race (pull_request) Successful in 5m55s
This could lead to hang the db. Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
fe9f664b57
commit
c065d55ca3
2 changed files with 2 additions and 35 deletions
|
@ -226,12 +226,6 @@ const (
|
|||
EngineFinishedSuccessfullyShardsEvacuation = "shards evacuation finished successfully"
|
||||
EngineFinishedWithErrorShardsEvacuation = "shards evacuation finished with error"
|
||||
EngineObjectIsMovedToAnotherShard = "object is moved to another shard"
|
||||
MetabaseMissingMatcher = "missing matcher"
|
||||
MetabaseErrorInFKBTSelection = "error in FKBT selection"
|
||||
MetabaseCantDecodeListBucketLeaf = "can't decode list bucket leaf"
|
||||
MetabaseUnknownOperation = "unknown operation"
|
||||
MetabaseCantIterateOverTheBucket = "can't iterate over the bucket"
|
||||
MetabaseCouldNotIterateOverTheBuckets = "could not iterate over the buckets"
|
||||
MetabaseCreatedDirectoryForMetabase = "created directory for Metabase"
|
||||
MetabaseOpenedBoltDBInstanceForMetabase = "opened boltDB instance for Metabase"
|
||||
MetabaseCheckingMetabaseVersion = "checking metabase version"
|
||||
|
|
|
@ -9,7 +9,6 @@ import (
|
|||
"time"
|
||||
|
||||
v2object "git.frostfs.info/TrueCloudLab/frostfs-api-go/v2/object"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/internal/metaerr"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-observability/tracing"
|
||||
cid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/container/id"
|
||||
|
@ -18,7 +17,6 @@ import (
|
|||
"go.etcd.io/bbolt"
|
||||
"go.opentelemetry.io/otel/attribute"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type (
|
||||
|
@ -288,8 +286,6 @@ func (db *DB) selectFromFKBT(
|
|||
) { //
|
||||
matchFunc, ok := db.matchers[f.Operation()]
|
||||
if !ok {
|
||||
db.log.Debug(logs.MetabaseMissingMatcher, zap.Stringer("operation", f.Operation()))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -298,7 +294,7 @@ func (db *DB) selectFromFKBT(
|
|||
return
|
||||
}
|
||||
|
||||
err := matchFunc.matchBucket(fkbtRoot, f.Header(), f.Value(), func(k, _ []byte) error {
|
||||
_ = matchFunc.matchBucket(fkbtRoot, f.Header(), f.Value(), func(k, _ []byte) error {
|
||||
fkbtLeaf := fkbtRoot.Bucket(k)
|
||||
if fkbtLeaf == nil {
|
||||
return nil
|
||||
|
@ -310,9 +306,6 @@ func (db *DB) selectFromFKBT(
|
|||
return nil
|
||||
})
|
||||
})
|
||||
if err != nil {
|
||||
db.log.Debug(logs.MetabaseErrorInFKBTSelection, zap.String("error", err.Error()))
|
||||
}
|
||||
}
|
||||
|
||||
// selectOutsideFKBT looks into all incl buckets to find list of addresses outside <fkbt> to add in
|
||||
|
@ -377,24 +370,17 @@ func (db *DB) selectFromList(
|
|||
case objectSDK.MatchStringEqual:
|
||||
lst, err = decodeList(bkt.Get(bucketKeyHelper(f.Header(), f.Value())))
|
||||
if err != nil {
|
||||
db.log.Debug(logs.MetabaseCantDecodeListBucketLeaf, zap.String("error", err.Error()))
|
||||
return
|
||||
}
|
||||
default:
|
||||
fMatch, ok := db.matchers[op]
|
||||
if !ok {
|
||||
db.log.Debug(logs.MetabaseUnknownOperation, zap.Uint32("operation", uint32(op)))
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
if err = fMatch.matchBucket(bkt, f.Header(), f.Value(), func(_, val []byte) error {
|
||||
l, err := decodeList(val)
|
||||
if err != nil {
|
||||
db.log.Debug(logs.MetabaseCantDecodeListBucketLeaf,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
@ -402,10 +388,6 @@ func (db *DB) selectFromList(
|
|||
|
||||
return nil
|
||||
}); err != nil {
|
||||
db.log.Debug(logs.MetabaseCantIterateOverTheBucket,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
@ -447,10 +429,6 @@ func (db *DB) selectObjectID(
|
|||
default:
|
||||
fMatch, ok := db.matchers[op]
|
||||
if !ok {
|
||||
db.log.Debug(logs.MetabaseUnknownOperation,
|
||||
zap.Uint32("operation", uint32(f.Operation())),
|
||||
)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -461,18 +439,13 @@ func (db *DB) selectObjectID(
|
|||
return
|
||||
}
|
||||
|
||||
err := fMatch.matchBucket(bkt, f.Header(), f.Value(), func(k, _ []byte) error {
|
||||
_ = fMatch.matchBucket(bkt, f.Header(), f.Value(), func(k, _ []byte) error {
|
||||
var id oid.ID
|
||||
if err := id.Decode(k); err == nil {
|
||||
appendOID(id)
|
||||
}
|
||||
return nil
|
||||
})
|
||||
if err != nil {
|
||||
db.log.Debug(logs.MetabaseCouldNotIterateOverTheBuckets,
|
||||
zap.String("error", err.Error()),
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue