mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 21:18:58 +00:00
(index) Explicitly free LongQueryBuffers
This commit is contained in:
parent
adf846bfd2
commit
df75e8f4aa
@ -9,7 +9,6 @@ import io.prometheus.client.Histogram;
|
||||
import it.unimi.dsi.fastutil.longs.LongArrayList;
|
||||
import lombok.SneakyThrows;
|
||||
import nu.marginalia.api.searchquery.*;
|
||||
import nu.marginalia.api.searchquery.model.compiled.CompiledQuery;
|
||||
import nu.marginalia.api.searchquery.model.compiled.CompiledQueryLong;
|
||||
import nu.marginalia.api.searchquery.model.compiled.CqDataInt;
|
||||
import nu.marginalia.api.searchquery.model.query.SearchSpecification;
|
||||
@ -335,6 +334,8 @@ public class IndexGrpcService extends IndexApiGrpc.IndexApiImplBase {
|
||||
}
|
||||
}
|
||||
|
||||
buffer.dispose();
|
||||
|
||||
if (!results.isEmpty()) {
|
||||
enqueueResults(new CombinedDocIdList(results));
|
||||
}
|
||||
|
@ -51,6 +51,11 @@ public class LongQueryBuffer {
|
||||
return copy;
|
||||
}
|
||||
|
||||
/** Dispose of the buffer and release resources */
|
||||
public void dispose() {
|
||||
data.close();
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
return end == 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user