[#1130] fstree: Remove useless Stat() call
DCO action / DCO (pull_request) Successful in 6m28s Details
Vulncheck / Vulncheck (pull_request) Successful in 5m52s Details
Build / Build Components (1.21) (pull_request) Successful in 11m14s Details
Build / Build Components (1.22) (pull_request) Successful in 11m20s Details
Tests and linters / gopls check (pull_request) Successful in 11m12s Details
Tests and linters / Staticcheck (pull_request) Successful in 12m5s Details
Tests and linters / Lint (pull_request) Successful in 16m52s Details
Pre-commit hooks / Pre-commit (pull_request) Successful in 17m37s Details
Tests and linters / Tests (1.21) (pull_request) Successful in 18m43s Details
Tests and linters / Tests with -race (pull_request) Successful in 18m46s Details
Tests and linters / Tests (1.22) (pull_request) Successful in 4m22s Details

```
goos: linux
goarch: amd64
pkg: git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobstor
cpu: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
                                           │     old     │                new                 │
                                           │   sec/op    │   sec/op     vs base               │
SubstorageReadPerf/fstree_nosync-seq100-8    2.689µ ± 2%   2.428µ ± 4%  -9.72% (p=0.000 n=10)
SubstorageReadPerf/fstree_nosync-rand100-8   2.727µ ± 1%   2.497µ ± 2%  -8.42% (p=0.000 n=10)
geomean                                      2.708µ        2.462µ       -9.07%
```

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
pull/1130/head
Evgenii Stratonikov 2024-05-14 16:04:09 +03:00
parent bf9bdde8ea
commit 6e71ae3bda
1 changed files with 0 additions and 4 deletions

View File

@ -358,10 +358,6 @@ func (t *FSTree) Get(ctx context.Context, prm common.GetPrm) (common.GetRes, err
p := t.treePath(prm.Address)
if _, err := os.Stat(p); os.IsNotExist(err) {
return common.GetRes{}, logicerr.Wrap(new(apistatus.ObjectNotFound))
}
var data []byte
var err error
{