You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by laimis <gi...@git.apache.org> on 2015/02/04 02:52:13 UTC
[GitHub] lucenenet pull request: replace dictionary with hashmap to support...
GitHub user laimis opened a pull request:
https://github.com/apache/lucenenet/pull/73
replace dictionary with hashmap to support null keys
Replace Dictionary with HashMap for tracking SegmentsToMerge in the IndexWriter. Lucene is using HashMap, and I can confirm by running Lucene 4.8 tests that sometimes there are cases when IndexWriter will insert null value as key. It is happening here:
https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/index/IndexWriter.java#L1788
When instance of OneMerge is created and passed around there is no guarantee that segment info will be set.
This now passes TestAddIndexesWithThreads and TestAddIndexesWithRollback in Lucene.Net.Index.TestAddIndexes.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/laimis/lucenenet indexwriter_fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucenenet/pull/73.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #73
----
commit dc371cc54c4b468acd27252d961ac920d7743f1c
Author: Laimonas Simutis <la...@gmail.com>
Date: 2015-02-04T01:43:57Z
replace dictionary with hashmap to support null keys
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] lucenenet pull request: replace dictionary with hashmap to support...
Posted by synhershko <gi...@git.apache.org>.
Github user synhershko commented on the pull request:
https://github.com/apache/lucenenet/pull/73#issuecomment-72820789
I would rather we don't use the `HashMap` support class if that is the only difference
Going through the IndexWriter code, there's no real meaning for a null segment marker - if it doesn't point to any specific segment it doesn't really matter if we track the boolean value for it or not.
I pushed a different fix, let's see how the tests behave
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] lucenenet pull request: replace dictionary with hashmap to support...
Posted by laimis <gi...@git.apache.org>.
Github user laimis closed the pull request at:
https://github.com/apache/lucenenet/pull/73
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] lucenenet pull request: replace dictionary with hashmap to support...
Posted by laimis <gi...@git.apache.org>.
Github user laimis commented on the pull request:
https://github.com/apache/lucenenet/pull/73#issuecomment-72841410
@synhershko sounds good, let's see what happens. The tests look good, I guess we will catch the issues if there are any and adjust. Closing this PR.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---