Make OnHeapIncrementalIndex clean maps on close()#2197
Conversation
|
|
@drcrallen why did this come up? It seems like the real problem is that something is keeping around indexes that it shouldn't be keeping around… |
|
Mostly because it is easy to screw up keeping indexes around. I had a similar problem in the spark batch indexer because I was handling the reference to the incremental index in an inefficient manner. It is a very easy mistake to make, and this change is intended to minimize its impact. Though yes, you are correct, having the incremental index object itself garbage collected properly is the preferred route. |
|
👍,Looks good to me. this can be merged unless @gianm has any more comments ? |
|
+1 |
|
|
Make OnHeapIncrementalIndex clean maps on close()
Related to #2149 this PR tries to help make sure any accidental references to an incremental index after its close() method is called has minimal memory impact.