Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id F37B8200C7C for ; Mon, 5 Jun 2017 11:50:18 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id F2541160BD4; Mon, 5 Jun 2017 09:50:18 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 20091160BBF for ; Mon, 5 Jun 2017 11:50:17 +0200 (CEST) Received: (qmail 36577 invoked by uid 500); 5 Jun 2017 09:50:17 -0000 Mailing-List: contact notifications-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list notifications@asterixdb.apache.org Received: (qmail 36568 invoked by uid 99); 5 Jun 2017 09:50:17 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 05 Jun 2017 09:50:17 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E7B86C0096 for ; Mon, 5 Jun 2017 09:50:16 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.126 X-Spam-Level: ** X-Spam-Status: No, score=2.126 tagged_above=-999 required=6.31 tests=[MISSING_HEADERS=1.207, SPF_FAIL=0.919] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id elxnMFzCmY7K for ; Mon, 5 Jun 2017 09:50:15 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 35B065FDA6 for ; Mon, 5 Jun 2017 09:50:15 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id DEC3D2412CB; Mon, 5 Jun 2017 02:50:14 -0700 (PDT) Date: Mon, 5 Jun 2017 02:50:14 -0700 From: "abdullah alamoudi (Code Review)" CC: Jenkins , Murtadha Hubail , Ian Maxon , Till Westmann , Yingyi Bu , Luo Chen Reply-To: bamousaa@gmail.com X-Gerrit-MessageType: comment Subject: Change in asterixdb[master]: Enable Component rollback in LSM Indexes X-Gerrit-Change-Id: I5fe10965734b60776100580c9568a0f954d6cb58 X-Gerrit-ChangeURL: X-Gerrit-Commit: 59cb18f371980856f72ec5cb69b32647eafbb35d In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 Message-Id: <20170605095014.DEC3D2412CB@unhygienix.ics.uci.edu> archived-at: Mon, 05 Jun 2017 09:50:19 -0000 abdullah alamoudi has posted comments on this change. Change subject: Enable Component rollback in LSM Indexes ...................................................................... Patch Set 4: (13 comments) https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/io/IIOManager.java File hyracks-fullstack/hyracks/hyracks-api/src/main/java/org/apache/hyracks/api/io/IIOManager.java: Line 82: * > Fix WS. Done Line 94: * > Fix WS. Done https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IOManager.java File hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/io/IOManager.java: PS4, Line 350: delete > Move public static methods to a XxxUtil class? Done https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IPageManager.java File hyracks-fullstack/hyracks/hyracks-storage-am-common/src/main/java/org/apache/hyracks/storage/am/common/api/IPageManager.java: PS4, Line 171: clear the page manager (cancel flush or merge) > I couldn't understand how the implementation matches the description? (It' The implementation you posted from the linked metadata page manager resets the page. the other implementation is in the append only page manager: if (confiscatedPage != null) { bufferCache.returnPage(confiscatedPage, false); } ready = false; if we don't do this, then when we try to destroy, we first close(). if we didn't clear, then the close will write the metadata page making the disk component a valid disk component. if a crash happens at this point, and before the destroy removes the file, then we have a disk component that we should not. https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMComponent.java File hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMComponent.java: PS4, Line 74: ROLLING_BACK > Is adding a new state into the state machine mandatory? I thought about this when I was writing the implementation. I remember there was a case where one would want to distinguish between the two but looking at it now, I think they can be merged!!!! not sure though. Done https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMDiskComponent.java File hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/api/ILSMDiskComponent.java: PS4, Line 69: boolean exists(); > It looks nobody calls that method, thus we probably shouldn't expose that. Done https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMMemoryComponent.java File hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/AbstractLSMMemoryComponent.java: PS4, Line 115: IllegalStateException > error code illegal state!! PS4, Line 119: IllegalStateException > error code illegal state!! https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java File hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/impls/LSMHarness.java: PS4, Line 210: { > I wonder whether there is a better approach? Done Line 216: failedOperation = true; > fix this Done PS4, Line 218: AbstractLSMDiskComponent > cast is not needed. Done PS4, Line 223: markAsValid > markAsValid will result in a disk force, i.e., an I/O operation. It doesn' Done https://asterix-gerrit.ics.uci.edu/#/c/1788/4/hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/JSONUtil.java File hyracks-fullstack/hyracks/hyracks-util/src/main/java/org/apache/hyracks/util/JSONUtil.java: PS4, Line 185: > complete the java doc. Done -- To view, visit https://asterix-gerrit.ics.uci.edu/1788 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5fe10965734b60776100580c9568a0f954d6cb58 Gerrit-PatchSet: 4 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: abdullah alamoudi Gerrit-Reviewer: Ian Maxon Gerrit-Reviewer: Jenkins Gerrit-Reviewer: Luo Chen Gerrit-Reviewer: Murtadha Hubail Gerrit-Reviewer: Till Westmann Gerrit-Reviewer: Yingyi Bu Gerrit-Reviewer: abdullah alamoudi Gerrit-HasComments: Yes