From issues-return-195006-archive-asf-public=cust-asf.ponee.io@hive.apache.org Mon Jul 6 16:20:02 2020 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 863BC180652 for ; Mon, 6 Jul 2020 18:20:02 +0200 (CEST) Received: (qmail 3093 invoked by uid 500); 6 Jul 2020 16:20:02 -0000 Mailing-List: contact issues-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list issues@hive.apache.org Received: (qmail 3060 invoked by uid 99); 6 Jul 2020 16:20:01 -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; Mon, 06 Jul 2020 16:20:01 +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 F0B494107A for ; Mon, 6 Jul 2020 16:20:00 +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 4B07078076E for ; Mon, 6 Jul 2020 16:20:00 +0000 (UTC) Date: Mon, 6 Jul 2020 16:20:00 +0000 (UTC) From: "ASF GitHub Bot (Jira)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work logged] (HIVE-23671) MSCK repair should handle transactional tables in certain usecases 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/HIVE-23671?focusedWorklogId=3D= 454934&page=3Dcom.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpa= nel#worklog-454934 ] ASF GitHub Bot logged work on HIVE-23671: ----------------------------------------- Author: ASF GitHub Bot Created on: 06/Jul/20 16:19 Start Date: 06/Jul/20 16:19 Worklog Time Spent: 10m=20 Work Description: pvargacl commented on a change in pull request #108= 7: URL: https://github.com/apache/hive/pull/1087#discussion_r450334396 ########## File path: standalone-metastore/metastore-server/src/main/java/org/apache/h= adoop/hive/metastore/HiveMetaStoreChecker.java ########## @@ -111,24 +120,24 @@ public IMetaStoreClient getMsc() { * @param partitions * List of partition name value pairs, if null or empty check a= ll * partitions - * @param table - * @param result - * Fill this with the results of the check + * @param table Table we want to run the check for. + * @return Results of the check * @throws MetastoreException * Failed to get required information from the metastore. * @throws IOException * Most likely filesystem related */ - public void checkMetastore(String catName, String dbName, String tableNa= me, - List> partitions, Table table, CheckRe= sult result) + public CheckResult checkMetastore(String catName, String dbName, String = tableName, + List> partitions, Table table) throws MetastoreException, IOException { - + CheckResult result =3D new CheckResult(); if (dbName =3D=3D null || "".equalsIgnoreCase(dbName)) { dbName =3D Warehouse.DEFAULT_DATABASE_NAME; } =20 try { if (tableName =3D=3D null || "".equals(tableName)) { + // TODO: I do not think this is used by anything other than tests Review comment: I do not know. If I understand correctly there is no way currently t= o call MSCK repair without a table specified, but it seems like someone mad= e some effort to create that feature and tests for it. But i don't know if = we ever want that in production (calling msck repair for every table seems = like a quick way to overwhelm the system) I left this comment here, for an= ybody who tries to makes sense of this code. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: users@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 454934) Time Spent: 8h 10m (was: 8h) > MSCK repair should handle transactional tables in certain usecases > ------------------------------------------------------------------ > > Key: HIVE-23671 > URL: https://issues.apache.org/jira/browse/HIVE-23671 > Project: Hive > Issue Type: Improvement > Components: Metastore > Reporter: Peter Varga > Assignee: Peter Varga > Priority: Major > Labels: pull-request-available > Time Spent: 8h 10m > Remaining Estimate: 0h > > The MSCK REPAIR tool does not handle transactional tables too well. It ca= n find and add new partitions the same way as for non-transactional tables,= but since the writeId differences are not handled, the data can not read b= ack from the new partitions. > We could handle some usecases when the writeIds in the HMS and the underl= ying data are not conflicting. If the HMS does not contains allocated write= s for the table we can seed the table with the writeIds read from the direc= tory structrure. > Real life use cases could be: > * Copy data files from one cluster to another with different HMS, create= the table and call MSCK REPAIR > * If the HMS db is lost, recreate the table and call MSCK REPAIR > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005)