Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

equivalent to java's Lucene patch 5644: switch to simpler LIFO thread to ThreadState allocator d… #208

Closed
wants to merge 2 commits into from

Conversation

vvdb
Copy link
Contributor

@vvdb vvdb commented Jun 13, 2017

…uring indexing”. Technically, this is something from releases/lucene-solr/4.8.1, but profiling indicates it makes a huge difference in multithreaded scenarios

vvdb added 2 commits June 13, 2017 07:50
…uring indexing”. Technically, this is something from releases/lucene-solr/4.8.1, but profiling indicates it makes a huge difference in multithreaded scenarios
public void Clear()
{
fields.Clear();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems unrelated?

@synhershko
Copy link
Contributor

Thanks, that's an interesting one.

First, there's a lot of whitespace noise - can you remove it please? (align with the project's whitespace specs)

Second, assuming we have no threading issues at the moment, how can we be sure this doesn't introduce any? cc @NightOwl888

@vvdb
Copy link
Contributor Author

vvdb commented Jun 13, 2017 via email

@NightOwl888
Copy link
Contributor

Second, assuming we have no threading issues at the moment, how can we be sure this doesn't introduce any? cc @NightOwl888

@synhershko

First of all, we still have some threading issues. The Lucene.Net.Store.TestLockFactory.TestStressLocksNativeFSLockFactory test and Lucene.Net.Store.TestLockFactory.TestStressLocks test still fail randomly, and there may be others (last I checked there were 2 tests that failed only when the MMapDirectory was randomly selected).

Secondly, this change is part of the Lucene 4.8.1 patch. Much of this port (including most or all of Analysis.Common) is from 4.8.1 already, so we should probably try to include the rest of the fixes to get us all the way to 4.8.1, especially if they have performance benefits.

@vvdb

If we are going to work toward 4.8.1 on a gradual basis, we should probably include a comment at the top of each changed file indicating the version compatibility level so we don't have to check the entire file to see if it is up to speed.

// Version compatibility level: 4.8.1

As for getting all the way there, I have outlined a procedure here for upgrading Lucene.Net to 4.8.1, which should be a lot quicker and easier than porting it from scratch again. Of course, it requires you to have a text comparison tool that allows you to filter out "unimportant changes" such as Beyond Compare. This will ensure we get all of the changes between the old file and new file and port them into the .NET file.

It would be better to have a tool that allows you to ignore simple code formatting changes (such as changing the curly bracket from the same line to the following line of a function or if statement), but to my knowledge a tool like that doesn't exist.

@vvdb vvdb closed this Jun 27, 2017
@NightOwl888
Copy link
Contributor

@vvdb

I would like to add this fix to the next release. Are you planning to submit another pull request?

@vvdb
Copy link
Contributor Author

vvdb commented Jun 27, 2017 via email

@dsmiley
Copy link

dsmiley commented Jun 28, 2017

Guys, the PR title here references LUCENE-5644 and this trigger's ASF JIRA-GitHub integration to link the conversation here to comments on that old issue. Can you please edit the PR title?

@vvdb vvdb changed the title LUCENE-5644: switch to simpler LIFO thread to ThreadState allocator d… equivalent to java's Lucene patch 5644: switch to simpler LIFO thread to ThreadState allocator d… Jun 28, 2017
NightOwl888 added a commit to NightOwl888/lucenenet that referenced this pull request Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants