Return-Path: Delivered-To: apmail-lucene-solr-dev-archive@minotaur.apache.org Received: (qmail 73486 invoked from network); 23 Feb 2010 14:30:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2010 14:30:52 -0000 Received: (qmail 44398 invoked by uid 500); 23 Feb 2010 14:30:51 -0000 Delivered-To: apmail-lucene-solr-dev-archive@lucene.apache.org Received: (qmail 44317 invoked by uid 500); 23 Feb 2010 14:30:51 -0000 Mailing-List: contact solr-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-dev@lucene.apache.org Delivered-To: mailing list solr-dev@lucene.apache.org Received: (qmail 44296 invoked by uid 99); 23 Feb 2010 14:30:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 14:30:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 14:30:49 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E7E05234C1EF for ; Tue, 23 Feb 2010 06:30:27 -0800 (PST) Message-ID: <1988115099.462181266935427948.JavaMail.jira@brutus.apache.org> Date: Tue, 23 Feb 2010 14:30:27 +0000 (UTC) From: "Noble Paul (JIRA)" To: solr-dev@lucene.apache.org Subject: [jira] Assigned: (SOLR-1787) CachedSqlEntityProcessor pre-warmed cache use case In-Reply-To: <1755402160.447901266880107908.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SOLR-1787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Noble Paul reassigned SOLR-1787: -------------------------------- Assignee: Noble Paul > CachedSqlEntityProcessor pre-warmed cache use case > -------------------------------------------------- > > Key: SOLR-1787 > URL: https://issues.apache.org/jira/browse/SOLR-1787 > Project: Solr > Issue Type: Improvement > Components: contrib - DataImportHandler > Affects Versions: 1.5 > Environment: jdk 1.6.x, windows xp, tomcat 6.x > Reporter: Michael Henson > Assignee: Noble Paul > Priority: Minor > Fix For: 1.5 > > Attachments: solr-1787.patch > > > The CachedSqlEntityProcessor currently builds a cache of rows it sees as it goes, so later requests for that same key can be served from data that has already been fetched. The primary query could be written to fetch all possible rows, which would then be set into the cache on the first request for a row. In that case the database would only receive another query when there is a cache miss. However, the query it would execute is the one that pulls all rows, negating any performance gain. > This patch adds the ability to configure behavior on cache miss with the "onCacheMiss" attribute on an "entity" tag in the data-config.xml file. The current behavior is the default, corresponding to the setting onCacheMiss="fill". Any other value explicitly given for onCacheMiss will cause cache misses to be ignored - no query will be made to the db to fulfill them. > I've encountered two cases where this capability is useful: > 1. Relatively small datasets, such as category id -> category name mappings, which will not change during the course of indexing. > 2. Queries which are heavy on db resources per-query, particularly if the query for an individual record is slow, and can't be fixed easily on the db side for whatever reason. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.