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 658A2200CDA for ; Thu, 20 Jul 2017 19:54:10 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 63F1C16BC94; Thu, 20 Jul 2017 17:54:10 +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 B159516BC97 for ; Thu, 20 Jul 2017 19:54:09 +0200 (CEST) Received: (qmail 77100 invoked by uid 500); 20 Jul 2017 17:54:08 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 77090 invoked by uid 99); 20 Jul 2017 17:54:08 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Jul 2017 17:54:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 4B455C35A7 for ; Thu, 20 Jul 2017 17:54:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.201 X-Spam-Level: X-Spam-Status: No, score=-99.201 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id 2zK9BONamAXe for ; Thu, 20 Jul 2017 17:54:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 3D1BC5FD1B for ; Thu, 20 Jul 2017 17:54:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id C2E49E0DFC for ; Thu, 20 Jul 2017 17:54:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 252CE21ED0 for ; Thu, 20 Jul 2017 17:54:00 +0000 (UTC) Date: Thu, 20 Jul 2017 17:54:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (GEODE-2886) The WaitUntilFlushedFunction throws an IllegalArgumentException instead of an IllegalStateException MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 20 Jul 2017 17:54:10 -0000 [ https://issues.apache.org/jira/browse/GEODE-2886?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16095078#comment-16095078 ] ASF GitHub Bot commented on GEODE-2886: --------------------------------------- Github user jhuynh1 commented on a diff in the pull request: https://github.com/apache/geode/pull/609#discussion_r128584677 --- Diff: geode-lucene/src/main/java/org/apache/geode/cache/lucene/internal/LuceneServiceImpl.java --- @@ -472,12 +478,20 @@ public boolean waitUntilFlushed(String indexName, String regionPath, long timeou new WaitUntilFlushedFunctionContext(indexName, timeout, unit); Execution execution = FunctionService.onRegion(dataRegion); ResultCollector rs = execution.setArguments(context).execute(WaitUntilFlushedFunction.ID); - List results = (List) rs.getResult(); - for (Boolean oneResult : results) { - if (oneResult == false) { + List results = (List) rs.getResult(); + if (results != null) { + if (results.get(0) instanceof IllegalStateException) { --- End diff -- Instead of checking types and silently handling this exception, it's probably better to just throw it and not have to modify this portion of code. > The WaitUntilFlushedFunction throws an IllegalArgumentException instead of an IllegalStateException > --------------------------------------------------------------------------------------------------- > > Key: GEODE-2886 > URL: https://issues.apache.org/jira/browse/GEODE-2886 > Project: Geode > Issue Type: Bug > Components: lucene > Reporter: Barry Oglesby > Assignee: Amey Barve > > When the AEQ doesn't exist, the WaitUntilFlushedFunction throws an IllegalArgumentException like: > {noformat} > Caused by: java.lang.IllegalArgumentException: The AEQ does not exist for the index xxx region /yyy > at org.apache.geode.cache.lucene.internal.distributed.WaitUntilFlushedFunction.execute(WaitUntilFlushedFunction.java:89) > at org.apache.geode.internal.cache.execute.AbstractExecution.executeFunctionLocally(AbstractExecution.java:333) > {noformat} > The arguments are actually fine so should it instead throw an IllegalStateException? -- This message was sent by Atlassian JIRA (v6.4.14#64029)