Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factories for cache creation [LUCENE-2394] #3469

Open
asfimport opened this issue Apr 14, 2010 · 5 comments
Open

Factories for cache creation [LUCENE-2394] #3469

asfimport opened this issue Apr 14, 2010 · 5 comments

Comments

@asfimport
Copy link

asfimport commented Apr 14, 2010

Hello all,

I've seen the #1906 (Complete overhaul of FieldCache API/Implementation) targeted for version 3.1 and I think that maybe, before this overhaul, it would be good to have a more cirurgical change, that would need smaller effort in new unit tests, without behavior changes and almost no performance impact.
One way to achieve that is inserting strategically positioned calls to a factory structure that would allow every already developed code to continue working without changes, at the same time giving the opportunity to put alternative factories to work.
Focusing on the cache idea (not specifically the FieldCache, that has it's own specific responsabilities, but in the key/value structure that will ultimately hold the cached objects) i've done the small change contained in the patch I'm attaching to this.
It has default implementations that encapsulate what was being originally used in FieldCache, so all current test cases passes, and creates the possibility to create a EHCacheFactory or InfinispanCacheFactory, or even MyOwnCachingStructureFactory.
With this, it would be easy to take advantage of the features provided by this kind of project in a uniform way and rapidly allowing new possibilities in scalability and tuning.
The code in the patch is small (16kb file is small if compared to the hundreds of kbs in other patchs) and even though it doesn't have javadoc right now (sorry) I hope it can be easly understood. So, if Lucene maintainers see that this contribution could be used (in a 2.9.n+1 and 3.0.n+1 and maybe influencing future versions) we could put some more effort in it, documenting, adding necessary unit tests and maybe contributing other factory implementations.
What do you think?


Migrated from LUCENE-2394 by Oswaldo Dantas, updated May 09 2016
Attachments: ASF.LICENSE.NOT.GRANTED--factoriesPatch.patch

@asfimport
Copy link
Author

Oswaldo Dantas (migrated from JIRA)

Attaching factory suggestion (patch for changes to https://svn.apache.org/repos/asf/lucene/java/tags/lucene_2_9_2) focusing in cache, being used in specifically in FieldCacheImpl and TermInfosReader to exemplify.

@asfimport
Copy link
Author

Michael McCandless (@mikemccand) (migrated from JIRA)

Moving fix version -> 4.0.

@asfimport
Copy link
Author

Steven Rowe (@sarowe) (migrated from JIRA)

Bulk move 4.4 issues to 4.5 and 5.0

@asfimport
Copy link
Author

Uwe Schindler (@uschindler) (migrated from JIRA)

Move issue to Lucene 4.9.

@asfimport
Copy link
Author

Jamie Johnson (migrated from JIRA)

Having the ability to do this would solve an issue stopping me from moving to Solr 5, are there any plans to tackle this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant