From hdfs-issues-return-287401-archive-asf-public=cust-asf.ponee.io@hadoop.apache.org Wed Oct 9 17:53:05 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id B5077180658 for ; Wed, 9 Oct 2019 19:53:04 +0200 (CEST) Received: (qmail 40795 invoked by uid 500); 9 Oct 2019 17:53:03 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 40441 invoked by uid 99); 9 Oct 2019 17:53:03 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Oct 2019 17:53:03 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id E4A71E3118 for ; Wed, 9 Oct 2019 17:53:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 8939B7808B3 for ; Wed, 9 Oct 2019 17:53:00 +0000 (UTC) Date: Wed, 9 Oct 2019 17:53:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: hdfs-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HDDS-1737) Add Volume check in KeyManager and File Operations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HDDS-1737?focusedWorklogId=3D3= 25847&page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpan= el#worklog-325847 ] ASF GitHub Bot logged work on HDDS-1737: ---------------------------------------- Author: ASF GitHub Bot Created on: 09/Oct/19 17:52 Start Date: 09/Oct/19 17:52 Worklog Time Spent: 10m=20 Work Description: bharatviswa504 commented on pull request #1559: HDD= S-1737. Add Volume check in KeyManager and File Operations. URL: https://github.com/apache/hadoop/pull/1559#discussion_r333148592 =20 =20 ########## File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozon= e/om/request/key/OMKeyRenameRequest.java ########## @@ -123,10 +125,15 @@ public OMClientResponse validateAndUpdateCache(Ozone= Manager ozoneManager, acquiredLock =3D omMetadataManager.getLock().acquireLock(BUCKET_LOCK= , volumeName, bucketName); =20 - // Not doing bucket/volume checks here. In this way we can avoid db - // checks for them. - // TODO: Once we have volume/bucket full cache, we can add - // them back, as these checks will be inexpensive at that time. + // Check bucket/volume exist. + String volumeKey =3D omMetadataManager.getVolumeKey(volumeName); + String bucketKey =3D omMetadataManager.getBucketKey(volumeName, buck= etName); + if (!omMetadataManager.getBucketTable().isExist(bucketKey)) { =20 Review comment: We can move this to a base class method, which can be used in all classe= s. =20 ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 325847) Time Spent: 2h 40m (was: 2.5h) > Add Volume check in KeyManager and File Operations > -------------------------------------------------- > > Key: HDDS-1737 > URL: https://issues.apache.org/jira/browse/HDDS-1737 > Project: Hadoop Distributed Data Store > Issue Type: Sub-task > Reporter: Bharat Viswanadham > Assignee: YiSheng Lien > Priority: Major > Labels: newbie, pull-request-available > Time Spent: 2h 40m > Remaining Estimate: 0h > > This is to address a TODO to check volume checks when performing Key/File= operations. > =C2=A0 > // TODO: Not checking volume exist here, once we have full cache we can > // add volume exist check also. > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org