Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1462 +/- ##
==========================================
- Coverage 36.36% 36.32% -0.04%
==========================================
Files 305 305
Lines 17782 17788 +6
==========================================
- Hits 6466 6462 -4
- Misses 10774 10778 +4
- Partials 542 548 +6
Continue to review full report at Codecov.
|
carpawell
reviewed
Jun 1, 2022
carpawell
previously approved these changes
Jun 2, 2022
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
If we should process address based on some condition, there is no need to read file content in memory. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Some of the objects are already flushed, don't do it twice. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
`Update` becomes a botleneck under a heavy load. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
`log.With` is suitable during initialization, but in other places it induces some overhead, even when branches with logging are not taken. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
cthulhu-rider
approved these changes
Jun 3, 2022
carpawell
approved these changes
Jun 3, 2022
cthulhu-rider
pushed a commit
that referenced
this pull request
Jun 3, 2022
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
cthulhu-rider
pushed a commit
that referenced
this pull request
Jun 3, 2022
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
cthulhu-rider
pushed a commit
that referenced
this pull request
Jun 3, 2022
If we should process address based on some condition, there is no need to read file content in memory. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
cthulhu-rider
pushed a commit
that referenced
this pull request
Jun 3, 2022
Some of the objects are already flushed, don't do it twice. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
cthulhu-rider
pushed a commit
that referenced
this pull request
Jun 3, 2022
`Update` becomes a botleneck under a heavy load. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
cthulhu-rider
pushed a commit
that referenced
this pull request
Jun 3, 2022
`log.With` is suitable during initialization, but in other places it induces some overhead, even when branches with logging are not taken. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
aprasolova
pushed a commit
to aprasolova/neofs-node
that referenced
this pull request
Oct 19, 2022
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
aprasolova
pushed a commit
to aprasolova/neofs-node
that referenced
this pull request
Oct 19, 2022
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
aprasolova
pushed a commit
to aprasolova/neofs-node
that referenced
this pull request
Oct 19, 2022
If we should process address based on some condition, there is no need to read file content in memory. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
aprasolova
pushed a commit
to aprasolova/neofs-node
that referenced
this pull request
Oct 19, 2022
Some of the objects are already flushed, don't do it twice. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
aprasolova
pushed a commit
to aprasolova/neofs-node
that referenced
this pull request
Oct 19, 2022
`Update` becomes a botleneck under a heavy load. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
aprasolova
pushed a commit
to aprasolova/neofs-node
that referenced
this pull request
Oct 19, 2022
`log.With` is suitable during initialization, but in other places it induces some overhead, even when branches with logging are not taken. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
aprasolova
pushed a commit
to aprasolova/neofs-node
that referenced
this pull request
Oct 19, 2022
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
roman-khimov
added a commit
that referenced
this pull request
Jun 24, 2025
The problem is that it can take a significant amount of time to perform while the value is questionable. It was initially added in 8717820 (#1462) when write cache had completely different structure and function. 733a792 tried to optimize it in #2068, but most of the code was subsequently deleted and as write cache is no longer a read cache this lead to the remaining code doing only the following: * checking objects against the metabase * checking objects against the underlying long-term storage If the first one is ever triggered (we detect non-existent object) this just means WC is out of sync with metabase which can happen for a number of other reasons. Lower level blobstor can also get out of sync with metabase in some cases, so it's not like this is something unique. If we're to drop this check we'd just flush some dead object, but then GC should still be able to remove it if it's deleted normally. If it's some other type of race --- like WC accepted an object and metabase not yet then we shouldn't delete it at all for safety reasons. Then if some valid object was previously flushed already we'll retry flushing it again and it's not a problem, EEXIST is not an error (but #2563), so we'd waste some time, but it's not very likely we're going to since this case is rare. So it should be safe to drop this useless code. Signed-off-by: Roman Khimov <roman@nspcc.ru>
roman-khimov
added a commit
that referenced
this pull request
Jun 24, 2025
The problem is that it can take a significant amount of time to perform while the value is questionable. It was initially added in 8717820 (#1462) when write cache had completely different structure and function. 733a792 tried to optimize it in #2068, but most of the code was subsequently deleted and as write cache is no longer a read cache this lead to the remaining code doing only the following: * checking objects against the metabase * checking objects against the underlying long-term storage If the first one is ever triggered (we detect non-existent object) this just means WC is out of sync with metabase which can happen for a number of other reasons. Lower level blobstor can also get out of sync with metabase in some cases, so it's not like this is something unique. If we're to drop this check we'd just flush some dead object, but then GC should still be able to remove it if it's deleted normally. If it's some other type of race --- like WC accepted an object and metabase not yet then we shouldn't delete it at all for safety reasons. Then if some valid object was previously flushed already we'll retry flushing it again and it's not a problem, EEXIST is not an error (but #2563), so we'd waste some time, but it's not very likely we're going to since this case is rare. So it should be safe to drop this useless code. Signed-off-by: Roman Khimov <roman@nspcc.ru>
roman-khimov
added a commit
that referenced
this pull request
Jun 24, 2025
The problem is that it can take a significant amount of time to perform while the value is questionable. It was initially added in 8717820 (#1462) when write cache had completely different structure and function. 733a792 tried to optimize it in #2068, but most of the code was subsequently deleted and as write cache is no longer a read cache this lead to the remaining code doing only the following: * checking objects against the metabase * checking objects against the underlying long-term storage If the first one is ever triggered (we detect non-existent object) this just means WC is out of sync with metabase which can happen for a number of other reasons. Lower level blobstor can also get out of sync with metabase in some cases, so it's not like this is something unique. If we're to drop this check we'd just flush some dead object, but then GC should still be able to remove it if it's deleted normally. If it's some other type of race --- like WC accepted an object and metabase not yet then we shouldn't delete it at all for safety reasons. Then if some valid object was previously flushed already we'll retry flushing it again and it's not a problem, EEXIST is not an error (but #2563), so we'd waste some time, but it's not very likely we're going to since this case is rare. So it should be safe to drop this useless code. Signed-off-by: Roman Khimov <roman@nspcc.ru>
roman-khimov
added a commit
that referenced
this pull request
Jun 24, 2025
The problem is that it can take a significant amount of time to perform while the value is questionable. It was initially added in 8717820 (#1462) when write cache had completely different structure and function. 733a792 tried to optimize it in #2068, but most of the code was subsequently deleted and as write cache is no longer a read cache this lead to the remaining code doing only the following: * checking objects against the metabase * checking objects against the underlying long-term storage If the first one is ever triggered (we detect non-existent object) this just means WC is out of sync with metabase which can happen for a number of other reasons. Lower level blobstor can also get out of sync with metabase in some cases, so it's not like this is something unique. If we're to drop this check we'd just flush some dead object, but then GC should still be able to remove it if it's deleted normally. If it's some other type of race --- like WC accepted an object and metabase not yet then we shouldn't delete it at all for safety reasons. Then if some valid object was previously flushed already we'll retry flushing it again and it's not a problem, EEXIST is not an error (but #2563), so we'd waste some time, but it's not very likely we're going to since this case is rare. So it should be safe to drop this useless code. Signed-off-by: Roman Khimov <roman@nspcc.ru>
roman-khimov
added a commit
that referenced
this pull request
Jun 25, 2025
The problem is that it can take a significant amount of time to perform while the value is questionable. It was initially added in 8717820 (#1462) when write cache had completely different structure and function. 733a792 tried to optimize it in #2068, but most of the code was subsequently deleted and as write cache is no longer a read cache this lead to the remaining code doing only the following: * checking objects against the metabase * checking objects against the underlying long-term storage If the first one is ever triggered (we detect non-existent object) this just means WC is out of sync with metabase which can happen for a number of other reasons. Lower level blobstor can also get out of sync with metabase in some cases, so it's not like this is something unique. If we're to drop this check we'd just flush some dead object, but then GC should still be able to remove it if it's deleted normally. If it's some other type of race --- like WC accepted an object and metabase not yet then we shouldn't delete it at all for safety reasons. Then if some valid object was previously flushed already we'll retry flushing it again and it's not a problem, EEXIST is not an error (but #2563), so we'd waste some time, but it's not very likely we're going to since this case is rare. So it should be safe to drop this useless code. Signed-off-by: Roman Khimov <roman@nspcc.ru>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
FSTree.