From dev-return-359793-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Thu Jun 20 07:55:04 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 8E930180670 for ; Thu, 20 Jun 2019 09:55:04 +0200 (CEST) Received: (qmail 41975 invoked by uid 500); 20 Jun 2019 07:55:02 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 41965 invoked by uid 99); 20 Jun 2019 07:55:02 -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; Thu, 20 Jun 2019 07:55:02 +0000 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 DCAB3E2DE1 for ; Thu, 20 Jun 2019 07:55: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 5897925452 for ; Thu, 20 Jun 2019 07:55:00 +0000 (UTC) Date: Thu, 20 Jun 2019 07:55:00 +0000 (UTC) From: "Adrien Grand (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-8855) Add Accountable to Query implementations 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/LUCENE-8855?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D168= 68322#comment-16868322 ]=20 Adrien Grand commented on LUCENE-8855: -------------------------------------- Thanks Andrzej this looks like a better trade-off to me in general. Do we n= eed Accountable on PointRangeQuery, this one should always be small? I thin= k we should also avoid Accountable on BytesRef and IntsRef since these obje= cts can be used to represent a slice of an array. For instance I know in so= me of places we have collections of BytesRef objects that all share the sam= e byte[], so counting the underlying byte[] more than once would be incorre= ct. In the case of unknown queries I'm wondering whether we should return an ar= bitrary constant instead of the shallow size of the object, in order to ove= restimate memory usage instead of underestimating it? For the caching use-c= ase I suspect it's better to overestimate memory usage a bit? > Add Accountable to Query implementations > ---------------------------------------- > > Key: LUCENE-8855 > URL: https://issues.apache.org/jira/browse/LUCENE-8855 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Andrzej Bialecki=20 > Assignee: Andrzej Bialecki=20 > Priority: Major > Attachments: LUCENE-8855.patch, LUCENE-8855.patch, LUCENE-8855.pa= tch > > > Query implementations should also support {{Accountable}}=C2=A0API in ord= er to=C2=A0monitor the memory consumption e.g. in caches where either keys = or values are {{Query}} instances. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org