From ce763258401352e87d5b2b5d22ea8b17b1c26f01 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Thu, 3 Mar 2022 16:52:27 +0300 Subject: [PATCH] [#1146] engine: remove TODO and add a comment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Parallel check seems to be slower, so remove TODO. ``` name \ time/op old new pool Exists/2_shards-40 52.3µs ±23% 91.6µs ± 6% 84.2µs ± 1% Exists/4_shards-40 72.7µs ±11% 121.8µs ± 8% 116.9µs ± 5% name \ alloc/op old new pool Exists/2_shards-40 5.00kB ± 0% 5.03kB ± 0% 5.16kB ± 0% Exists/4_shards-40 9.89kB ± 0% 9.93kB ± 1% 10.19kB ± 0% name \ allocs/op old new pool Exists/2_shards-40 112 ± 1% 115 ± 1% 117 ± 1% Exists/4_shards-40 207 ± 1% 211 ± 1% 216 ± 1% ``` Signed-off-by: Evgenii Stratonikov --- pkg/local_object_storage/engine/put.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/local_object_storage/engine/put.go b/pkg/local_object_storage/engine/put.go index e230cce32..5076a4ab4 100644 --- a/pkg/local_object_storage/engine/put.go +++ b/pkg/local_object_storage/engine/put.go @@ -49,7 +49,9 @@ func (e *StorageEngine) put(prm *PutPrm) (*PutRes, error) { defer elapsed(e.metrics.AddPutDuration)() } - _, err := e.exists(prm.obj.Address()) // TODO: #1146 make this check parallel + // In #1146 this check was parallelized, however, it became + // much slower on fast machines for 4 shards. + _, err := e.exists(prm.obj.Address()) if err != nil { return nil, err }