[
https://issues.apache.org/jira/browse/HDDS-9662?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Attila Doroszlai updated HDDS-9662:
-----------------------------------
Fix Version/s: 1.4.0
> Recon's keyContainerTable doesn't get cleaned up after key deletes
> ------------------------------------------------------------------
>
> Key: HDDS-9662
> URL: https://issues.apache.org/jira/browse/HDDS-9662
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Recon
> Reporter: Christos Bisias
> Assignee: Christos Bisias
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.4.0
>
>
> After key deletes and syncing Recon with OM, *keyContainerTable* isn't
> updated and all the entries are still there.
> This can be tested manually following the steps below.
>
> from project root
> {code:java}
> > cd hadoop-ozone/dist/target/ozone-1.4.0-SNAPSHOT/compose/ozone{code}
> start docker env and connect to Recon
> {code:java}
> > docker-compose up --scale datanode=3 -d
> > docker-compose exec recon bash {code}
> create keys
> {code:java}
> bash-4.2$ ozone freon ockg -t 10 -n 10
> ...
> ...
> Total execution time (sec): 2
> Failures: 0
> Successful executions: 10 {code}
> delete all the keys
> {code:java}
> bash-4.2$ ozone fs -ls /vol1/bucket1
> Found 1 items
> drwxrwxrwx - hadoop hadoop 0 2023-11-09 13:04
> /vol1/bucket1/ye6rtz4g0t
> bash-4.2$ ozone fs -rm -r -skipTrash /vol1/bucket1/ye6rtz4g0t
> Deleted /vol1/bucket1/ye6rtz4g0t
> bash-4.2$ ozone sh key list /vol1/bucket1
> [ ]{code}
> trigger a recon sync with the OM
> {code:java}
> bash-4.2$ curl http://recon:9888/api/v1/triggerdbsync/om
> truebash-4.2$ {code}
> check Recon's tables
> {code:java}
> bash-4.2$ ozone debug ldb
> --db=/data/metadata/recon/recon-container-key.db_1699534950711 scan
> --cf=containerKeyTable
> { }
> bash-4.2$ ozone debug ldb
> --db=/data/metadata/recon/recon-container-key.db_1699534950711 scan
> --cf=containerKeyCountTable
> { 1: 0
> , 2: 0
> , 3: 0
> }
> bash-4.2$ ozone debug ldb
> --db=/data/metadata/recon/recon-container-key.db_1699534950711 scan
> --cf=keyContainerTable
> { {
> "containerId" : 1,
> "keyPrefix" :
> "/-9223372036854775552/-9223372036854775040/-9223372036854774527/0",
> "keyVersion" : 0
> }: 1
> ...
> ...
> ...
> , {
> "containerId" : 3,
> "keyPrefix" :
> "/-9223372036854775552/-9223372036854775040/-9223372036854774527/9",
> "keyVersion" : 0
> }: 1
> } {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]