-
Notifications
You must be signed in to change notification settings - Fork 639
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
Investigate Failing Test: Lucene.Net.Replicator.Http.HttpReplicatorTest::TestBasic() #363
Comments
I have not had a lucene environment up and running for a while (sadly) - is this reproduceable locally? |
Unfortunately, even with the This might have something to do with the fact that we have upgraded
|
Ok, that is unfortunate as that would likely make it easier to fix. As far as goes for the threading, I choose the design that is in place as that does not allocate a dedicated thread which would be against general recommendations, as well as not allowing workitem exceptions to bring down the whole process (which is a difference to JAVA). But I can't see that it would break anything to switch to the ThreadJob class as such. We could also do the same in the current implementation, catching the exception that halted the executing thread and then rethrowing that on a call to "StopUpdateThread". Threading and Exception in Java and .NET is very different, so it can be hard to be certain to ensure the Java behavior fully, so i think it's worth looking critically on the "Java Design" in such areas as we can hardly avoid differences anyways, then if it can be implemented in a .NET way in a "isolated" way, I would prefer that. But I have not hard feelings otherwise. StopUpdateThread is never called as far as I can tell in this case though so regardless of one or the other, I think that could be a discusison that could be taken in another issue. |
This seems to be a known issue with Microsoft and there is a lot of discussion about it. However, I haven't yet tried any of the proposed solutions. |
…t from 1000 ms to 100 s. Renamed DEFAULT_CONNECTION_TIMEOUT to DEFAULT_TIMEOUT and ConnectionTimeout property to Timeout to match HttpClient. Fixes apache#363.
I just submitted some patches for Replicator in #534, including the fix for this issue and 2 other tests that were failing more rarely and sometimes deadlocking. During this process, I ended up going through and updating the AspNetCore tests to follow a more modern approach (with a conditional compile for the .NET Core 3.1 and lower tests). And of course, it was a bit cumbersome because of the lack of async/await support, as you mentioned. It seems like there should be a way to get there, but more analysis is needed to know how deep that rabbit hole goes. It would be nice to support async/await for the AspNetCore users of replicator, and if we do provide a solution it would be safer to provide it before the 4.8.0 release to avoid breaking any APIs. That said, it isn't a critical feature so we could live without it if need be. But it doesn't look like it is a contributor to any real problem with Replicator. Without the async support, we are probably blocking other parallel tasks from occurring. I had to add a configuration setting to the context to allow blocking IO code to run because in .NET 5 it will throw an
The tests that were overriding You are right, it could have been done in the current implementation, but this does end up being less code to maintain by subclassing |
…t from 1000 ms to 100 s. Renamed DEFAULT_CONNECTION_TIMEOUT to DEFAULT_TIMEOUT and ConnectionTimeout property to Timeout to match HttpClient. Fixes #363.
This test failure began occurring when we set up the nightly build.
Note that the failure could have something to do with changing the nightly limits of Rarely() and AtLeast() which were changed to try to make the nightly tests run in under 1 hour.
The text was updated successfully, but these errors were encountered: