You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2010/07/29 11:38:16 UTC
[jira] Commented: (LUCENE-2575) Concurrent byte and int block
implementations
[ https://issues.apache.org/jira/browse/LUCENE-2575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893564#action_12893564 ]
Michael McCandless commented on LUCENE-2575:
--------------------------------------------
Logically, every term has its own open IndexOutput, where it can write any number of bytes. During indexing, when we hit a given term, we init its IndexOutput (two of of them -- one frq, one prx) and write a few bytes as appropriate.
It's that abstraction that the interleaved byte slices API provides -- the ability to hold open a great many IndexOutputs.
We should then be able to init IndexInputs against these slices as well, but they can only sequentially scan.
To handle skipping, I think we can write to another ByteBlockPool? That skip data would be similar to the multi-level skip data we now record, except instead of indexing into a single frq or prx file, it indexes into positions in the primary ByteBlockPool.
Where is there a concurrency problem? Is it a JMM visibility issue of writes from one thread vs reads, in a shared byte[]?
> Concurrent byte and int block implementations
> ---------------------------------------------
>
> Key: LUCENE-2575
> URL: https://issues.apache.org/jira/browse/LUCENE-2575
> Project: Lucene - Java
> Issue Type: Improvement
> Components: Index
> Affects Versions: Realtime Branch
> Reporter: Jason Rutherglen
> Fix For: Realtime Branch
>
>
> The current *BlockPool implementations aren't quite concurrent.
> We really need something that has a locking flush method, where
> flush is called at the end of adding a document. Once flushed,
> the newly written data would be available to all other reading
> threads (ie, postings etc). I'm not sure I understand the slices
> concept, it seems like it'd be easier to implement a seekable
> random access file like API. One'd seek to a given position,
> then read or write from there. The underlying management of byte
> arrays could then be hidden?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org