forked from TrueCloudLab/frostfs-node
[#146] Add more log entries
Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
parent
d6486d172e
commit
d2bc0b83b1
10 changed files with 35 additions and 5 deletions
|
@ -2,6 +2,7 @@ package engine
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/shard"
|
||||||
|
@ -141,6 +142,7 @@ func (e *StorageEngine) reportShardError(
|
||||||
if isLogical(err) {
|
if isLogical(err) {
|
||||||
e.log.Warn(msg,
|
e.log.Warn(msg,
|
||||||
zap.Stringer("shard_id", sh.ID()),
|
zap.Stringer("shard_id", sh.ID()),
|
||||||
|
zap.String("logical", strconv.FormatBool(true)),
|
||||||
zap.String("error", err.Error()))
|
zap.String("error", err.Error()))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -144,6 +144,10 @@ func (e *StorageEngine) inhumeAddr(ctx context.Context, addr oid.Address, prm sh
|
||||||
|
|
||||||
var siErr *objectSDK.SplitInfoError
|
var siErr *objectSDK.SplitInfoError
|
||||||
if !errors.As(err, &siErr) {
|
if !errors.As(err, &siErr) {
|
||||||
|
e.log.Warn("could not check for presents in shard",
|
||||||
|
zap.Stringer("shard_id", sh.ID()),
|
||||||
|
zap.Stringer("address", addr),
|
||||||
|
zap.String("error", err.Error()))
|
||||||
e.reportShardError(sh, "could not check for presents in shard", err)
|
e.reportShardError(sh, "could not check for presents in shard", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
@ -136,11 +136,13 @@ func (e *StorageEngine) putToShard(sh hashedShard, ind int, pool util.WorkerPool
|
||||||
errors.Is(err, common.ErrReadOnly) || errors.Is(err, common.ErrNoSpace) {
|
errors.Is(err, common.ErrReadOnly) || errors.Is(err, common.ErrNoSpace) {
|
||||||
e.log.Warn("could not put object to shard",
|
e.log.Warn("could not put object to shard",
|
||||||
zap.Stringer("shard_id", sh.ID()),
|
zap.Stringer("shard_id", sh.ID()),
|
||||||
zap.String("error", err.Error()))
|
zap.String("error", err.Error()),
|
||||||
|
zap.Stringer("address", object.AddressOf(obj)),
|
||||||
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
e.reportShardError(sh, "could not put object to shard", err)
|
e.reportShardError(sh, "could not put object to shard", err, zap.Stringer("address", object.AddressOf(obj)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,9 @@ func (s *Shard) Put(prm PutPrm) (PutRes, error) {
|
||||||
if err != nil || !tryCache {
|
if err != nil || !tryCache {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s.log.Debug("can't put object to the write-cache, trying blobstor",
|
s.log.Debug("can't put object to the write-cache, trying blobstor",
|
||||||
zap.String("err", err.Error()))
|
zap.String("err", err.Error()),
|
||||||
|
zap.Stringer("address", putPrm.Address),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
res, err = s.blobStor.Put(putPrm)
|
res, err = s.blobStor.Put(putPrm)
|
||||||
|
|
|
@ -34,7 +34,7 @@ func (s *Service) Delete(ctx context.Context, prm Prm) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (exec *execCtx) execute(ctx context.Context) {
|
func (exec *execCtx) execute(ctx context.Context) {
|
||||||
exec.log.Debug("serving request...")
|
exec.log.Debug("serving delete request...")
|
||||||
|
|
||||||
// perform local operation
|
// perform local operation
|
||||||
exec.executeLocal(ctx)
|
exec.executeLocal(ctx)
|
||||||
|
|
|
@ -2,6 +2,7 @@ package deletesvc
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strconv"
|
||||||
|
|
||||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||||
|
@ -40,6 +41,8 @@ func (exec *execCtx) formTombstone(ctx context.Context) (ok bool) {
|
||||||
)
|
)
|
||||||
exec.addMembers([]oid.ID{exec.address().Object()})
|
exec.addMembers([]oid.ID{exec.address().Object()})
|
||||||
|
|
||||||
|
exec.log.Debug("tombstone lifetime " + strconv.FormatUint(exec.tombstone.ExpirationEpoch(), 10))
|
||||||
|
exec.log.Debug("CurrentEpoch " + strconv.FormatUint(exec.svc.netInfo.CurrentEpoch(), 10))
|
||||||
exec.log.Debug("forming split info...")
|
exec.log.Debug("forming split info...")
|
||||||
|
|
||||||
ok = exec.formSplitInfo(ctx)
|
ok = exec.formSplitInfo(ctx)
|
||||||
|
|
|
@ -198,7 +198,10 @@ func (t *distributedTarget) iteratePlacement(ctx context.Context) (*transformer.
|
||||||
if t.traversal.submitPrimaryPlacementFinish() {
|
if t.traversal.submitPrimaryPlacementFinish() {
|
||||||
_, err = t.iteratePlacement(ctx)
|
_, err = t.iteratePlacement(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.log.Error("additional container broadcast failure", zap.Error(err))
|
t.log.Error("additional container broadcast failure",
|
||||||
|
zap.Error(err),
|
||||||
|
zap.String("address", object.AddressOf(t.obj).String()),
|
||||||
|
)
|
||||||
// we don't fail primary operation because of broadcast failure
|
// we don't fail primary operation because of broadcast failure
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,6 +109,11 @@ func (exec *execCtx) processCurrentEpoch(ctx context.Context) bool {
|
||||||
|
|
||||||
mtx.Lock()
|
mtx.Lock()
|
||||||
exec.writeIDList(ids)
|
exec.writeIDList(ids)
|
||||||
|
for _, id := range ids {
|
||||||
|
exec.log.Debug("found id on node "+string(info.PublicKey()),
|
||||||
|
zap.String("id", id.String()),
|
||||||
|
)
|
||||||
|
}
|
||||||
mtx.Unlock()
|
mtx.Unlock()
|
||||||
}(i)
|
}(i)
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,5 +18,12 @@ func (exec *execCtx) executeLocal() {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for _, id := range ids {
|
||||||
|
exec.log.Debug("found id",
|
||||||
|
zap.String("id", id.String()),
|
||||||
|
zap.String("for", exec.containerID().String()),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
exec.writeIDList(ids)
|
exec.writeIDList(ids)
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,6 +129,8 @@ func (p *Policer) processObject(ctx context.Context, addrWithType objectcore.Add
|
||||||
if !c.needLocalCopy && c.removeLocalCopy {
|
if !c.needLocalCopy && c.removeLocalCopy {
|
||||||
p.log.Info("redundant local object copy detected",
|
p.log.Info("redundant local object copy detected",
|
||||||
zap.Stringer("object", addr),
|
zap.Stringer("object", addr),
|
||||||
|
zap.Bool("c.needLocalCopy", c.needLocalCopy),
|
||||||
|
zap.Bool("c.removeLocalCopy", c.removeLocalCopy),
|
||||||
)
|
)
|
||||||
|
|
||||||
p.cbRedundantCopy(ctx, addr)
|
p.cbRedundantCopy(ctx, addr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue