[
https://issues.apache.org/jira/browse/LUCENE-5591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shai Erera updated LUCENE-5591:
-------------------------------
Attachment: LUCENE-5591.patch
Thanks Mike. I modified to ramBytesPerDoc and fixed Numeric to return a proper
approximation (I neglected to factor in the values themselves!!). Also, I
estimate the amount of RAM per document used by the PagedGrowableWriters.
I don't call BytesRef.append(), but grow() and arraycopy(). I could have used
bytesRef.grow() followed by bytesRef.append(), but it double-checks the
capacity...
Tests pass.
> ReaderAndUpdates should create a proper IOContext when writing DV updates
> -------------------------------------------------------------------------
>
> Key: LUCENE-5591
> URL: https://issues.apache.org/jira/browse/LUCENE-5591
> Project: Lucene - Core
> Issue Type: Improvement
> Reporter: Shai Erera
> Attachments: LUCENE-5591.patch, LUCENE-5591.patch
>
>
> Today we pass IOContext.DEFAULT. If DV updates are used in conjunction w/
> NRTCachingDirectory, it means the latter will attempt to write the entire DV
> field in its RAMDirectory, which could lead to OOM.
> Would be good if we can build our own FlushInfo, estimating the number of
> bytes we're about to write. I didn't see off hand a quick way to guesstimate
> that - I thought to use the current DV's sizeInBytes as an approximation, but
> I don't see a way to get it, not a direct way at least.
> Maybe we can use the size of the in-memory updates to guesstimate that
> amount? Something like {{sizeOfInMemUpdates * (maxDoc/numUpdatedDocs)}}? Is
> it a too wild guess?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]