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 22:36:23 UTC
[GitHub] lucenenet pull request: Don't modify the collection while iteratin...
GitHub user laimis opened a pull request:
https://github.com/apache/lucenenet/pull/74
Don't modify the collection while iterating over it
Collection was being modified while iterated, which throws an exception in .NET. I am not 100% sure if try / finally is necessary but the comment was suggesting to do it as such. @synhershko any thoughts on this one? Is the idea here that we want to remove the ones that were successfully iterated over before the exception occurred?
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/laimis/lucenenet documentswriter_fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/lucenenet/pull/74.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 #74
----
commit f25c3c1a85f45ff64722f7d921f42c538b4b165d
Author: Laimonas Simutis <la...@gmail.com>
Date: 2015-02-04T21:29:54Z
don't modify while iterating over a collection
----
---
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: Don't modify the collection while iteratin...
Posted by synhershko <gi...@git.apache.org>.
Github user synhershko commented on the pull request:
https://github.com/apache/lucenenet/pull/74#issuecomment-72948582
No idea why it was implemented that way. Not sure why it needed locking as well - the method isn't synchronized in the original java code.
Maybe it was an attempt at freezing state - but again I see no reason for that
I just pushed another attempt at a fix, which is more in line with the original Java code - please review
https://github.com/apache/lucene-solr/blob/lucene_solr_4_8_0/lucene/core/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java#L563
---
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: Don't modify the collection while iteratin...
Posted by laimis <gi...@git.apache.org>.
Github user laimis commented on the pull request:
https://github.com/apache/lucenenet/pull/74#issuecomment-72975784
Cool, yeah it looked strange. The error is gone from the test logs.
---
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: Don't modify the collection while iteratin...
Posted by laimis <gi...@git.apache.org>.
Github user laimis closed the pull request at:
https://github.com/apache/lucenenet/pull/74
---
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.
---