[ https://issues.apache.org/jira/browse/SOLR-4916?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13705634#comment-13705634 ]
Uwe Schindler edited comment on SOLR-4916 at 7/11/13 9:25 AM: -------------------------------------------------------------- Hi Mark, while reviewing the current committed stuff I found a "bug": HdfsDirectory has a special case to prevent the {{segments.gen}} file from being written: It redirecty the output to an NullIndexOutput. The bug is that HdfDirectory has a static instance of this NullIndexOutput, but the static instance has "state" (file-size, file position). When you return always the same instance this is keeping state and not safe if used by different threads in parallel - so it could cause bugs. openOutput must return a new instance (which costs nothing as its a small object on Eden Heap only). See attached patch! was (Author: thetaphi): Hi Mark, while reviewing the current committed stuff I found a "bug": HdfsDirectory has a special case to prevent the {{segments.gen}} file from being written: It redirecty the output to an NullIndexOutput. The bug is that HdfDirectory has a static instance of this NullIndexOutput, but the static instance has "state" (file-size, file position). When you return always the same instance this is keeping state and not safe if used by different threads in parallel - so it could cause bugs. openOutput must return a new instance (which costs nothing as its a small object on Eden Heap only). > Add support to write and read Solr index files and transaction log files to > and from HDFS. > ------------------------------------------------------------------------------------------ > > Key: SOLR-4916 > URL: https://issues.apache.org/jira/browse/SOLR-4916 > Project: Solr > Issue Type: New Feature > Reporter: Mark Miller > Assignee: Mark Miller > Fix For: 5.0, 4.4 > > Attachments: SOLR-4916-ivy.patch, > SOLR-4916-move-MiniDfsCluster-deps-from-solr-test-framework-to-solr-core.patch, > SOLR-4916-nulloutput.patch, SOLR-4916.patch, SOLR-4916.patch, SOLR-4916.patch > > -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org