[
https://issues.apache.org/jira/browse/HDDS-7871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17683213#comment-17683213
]
Kaijie Chen edited comment on HDDS-7871 at 2/2/23 3:47 AM:
-----------------------------------------------------------
{quote}To fix this, we should add volume and bucket check here. We may or may
not need to iterate over the iterator.
{quote}
Yes we should check the result after seek. Thanks [~hemantk].
RocksIterator#seek(): Position at the first key in the source that at {*}or
past target{*}.
was (Author: ckj996):
{quote}To fix this, we should add volume and bucket check here. We may or may
not need to iterate over the iterator.
{quote}
Yes we should check the result after seek. Thanks [~hemantk].
RocksIterator#seek(): Position at the first key in the source that at or past
target.
> Improve key prefix verification in createFakeDirIfShould
> --------------------------------------------------------
>
> Key: HDDS-7871
> URL: https://issues.apache.org/jira/browse/HDDS-7871
> Project: Apache Ozone
> Issue Type: Bug
> Reporter: Siyao Meng
> Priority: Critical
>
> h2. Background
> {{KeyManagerImpl#createFakeDirIfShould}} is intended to return a "fake"
> OmKeyInfo entry for a directory to the client in the case of OBS or LEGACY
> bucket. It is called from {{getOzoneFileStatus}} from
> {{{}KeyManagerImpl#getFileStatus{}}}. This was added in HDDS-7253.
> h2. Discovery
> However, due to RockDB [prefix seek using a bloom
> filter|https://github.com/facebook/rocksdb/wiki/Prefix-Seek], leading to
> {{keyValue}} [returning
> non-null|https://github.com/apache/ozone/blob/106b193c2ae9e111ba273b1f9dcb1c1a6e9057cb/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/KeyManagerImpl.java#L1184-L1188]
> even if such volume+bucket+key prefix doesn't exist at all at times, it
> appears that the current prefix check logic in {{createFakeDirIfShould}} is
> not sufficient in verification.
> This is discovered by [~hemantk] while debugging HDDS-7861, a snapshot test,
> while the issue itself does not appear to be related to snapshot code
> additions.
> h2. Potential Solution
> Check volume and bucket names as well inside {{if (keyValue != null).}} We
> may or may not need to iterate over the iterator based on the expectations of
> {{KeyManagerImpl#createFakeDirIfShould}}.
> cc [~hemantk]
> cc [~XiChen]] [~ckj] [~duongnguyen] that authored/reviewed patch HDDS-7253
> cc [~erose] the OBS/FSO bucket expert
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]