tokee / lucene-solr

High cardinality faceting (SOLR-5894)
http://tokee.github.io/lucene-solr/
7 stars 1 forks source link

Auto-flush counter pool #35

Open tokee opened 9 years ago

tokee commented 9 years ago

Counter pools generally live until the index is updated. If facet calls are diverse, this means long-lived allocations that are rarely used. Time-based flushing of the pools (if unused for x minutes, then flush the pool) would free this memory at the cost of the standard startup-penalty on next use.

Note: The penalty of allocating a PackedInts-based counter from scratch is relatively small, while it can be quite large for N-plane or N-Planez. If a default timeout is to be used, it should be very conservative.