Return-Path: X-Original-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Delivered-To: apmail-asterixdb-notifications-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 63EAB186CE for ; Thu, 29 Oct 2015 02:05:12 +0000 (UTC) Received: (qmail 44469 invoked by uid 500); 29 Oct 2015 02:05:12 -0000 Delivered-To: apmail-asterixdb-notifications-archive@asterixdb.apache.org Received: (qmail 44440 invoked by uid 500); 29 Oct 2015 02:05:12 -0000 Mailing-List: contact notifications-help@asterixdb.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.incubator.apache.org Delivered-To: mailing list notifications@asterixdb.incubator.apache.org Received: (qmail 44431 invoked by uid 99); 29 Oct 2015 02:05:12 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Oct 2015 02:05:12 +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 8B717C0FDA for ; Thu, 29 Oct 2015 02:05:11 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.127 X-Spam-Level: ** X-Spam-Status: No, score=2.127 tagged_above=-999 required=6.31 tests=[MISSING_HEADERS=1.207, SPF_FAIL=0.919, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id THi9Cu8lITEc for ; Thu, 29 Oct 2015 02:05:04 +0000 (UTC) Received: from unhygienix.ics.uci.edu (unhygienix.ics.uci.edu [128.195.14.130]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 5FE2A20E9B for ; Thu, 29 Oct 2015 02:05:03 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by unhygienix.ics.uci.edu (Postfix) with ESMTP id 33645240C3B; Wed, 28 Oct 2015 19:02:13 -0700 (PDT) Date: Wed, 28 Oct 2015 19:02:13 -0700 From: "Murtadha Hubail (Code Review)" CC: Jenkins , Young-Seok Kim Reply-To: hubailmor@gmail.com X-Gerrit-MessageType: comment Subject: Change in asterixdb[master]: ASTERIXDB-969: Redesigned recovery analysis phase to spill t... X-Gerrit-Change-Id: Ide2b346c2ad498d7595e71bae890362c2143d301 X-Gerrit-ChangeURL: X-Gerrit-Commit: d1fdec1c19846d4632ed6e9815f7bff7aec3b00e 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.8.4 Message-Id: <20151029020213.33645240C3B@unhygienix.ics.uci.edu> Murtadha Hubail has posted comments on this change. Change subject: ASTERIXDB-969: Redesigned recovery analysis phase to spill to disk ...................................................................... Patch Set 1: (10 comments) https://asterix-gerrit.ics.uci.edu/#/c/458/1/asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java File asterix-transactions/src/main/java/org/apache/asterix/transaction/management/service/recovery/RecoveryManager.java: Line 213: if (jobId2WinnerEntitiesMap.containsKey(jobId)) { > Here, jobId is not updated. Done Line 217: jobId2WinnerEntitiesMap.remove(logRecord.getJobId()); > let's be consistent: either use jobid or logRecord.getJobId(). Done Line 225: if (needToFreeMemroy()) { > Typo: needToFreeMemory Done Line 574: if (!jobRecoveryFile.exists()) { > How can the file exist? Should this be an exception? I changed it to be an exception if it already exists. Line 834: if (preparedForSearch) { > This method is called only once per winnerEntitySet. So, this check seems u This is just a protection in case someone calls it twice by mistake. I removed it anyway. Line 909: if (needToFreeMemroy()) { > Are these check and free operation necessary? It seems that the same operat The next step after this line allocates a buffer that can hold this in memory partition. If there isn't enough memory, it will throw an error. That's why this check is needed. I can eliminate it by writing the in-memory cached entities to the file channel one by one, but I don't think it is worth it. Line 921: File partitionFile = createJobRecoveryFile(jobId, getPartitonName(partitionMaxLSN)); > typo: getPartitionName Done Line 923: try (FileOutputStream fileOutputstream = new FileOutputStream(partitionFile, false); > what is this try for? This is try with resources that automatically closes the file channel at the end of the try block Line 926: fileChannel.write(buffer); > busy waiting and write everything Done Line 927: fileChannel.force(true); > force seems not necessary. If there is a crash, anyway everything will be d Removed. -- To view, visit https://asterix-gerrit.ics.uci.edu/458 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ide2b346c2ad498d7595e71bae890362c2143d301 Gerrit-PatchSet: 1 Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-Owner: Murtadha Hubail Gerrit-Reviewer: Jenkins Gerrit-Reviewer: Murtadha Hubail Gerrit-Reviewer: Young-Seok Kim Gerrit-HasComments: Yes