-
Notifications
You must be signed in to change notification settings - Fork 23
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
Infinite loop while( my $rs = scroller->next ) #99
Comments
Could you try adding |
Sorry for the delayed response, its been a busy week. I added the module as shown below.
On Debian Jessie, I received two surprises:
The only change made to this host was the installation of the logger and the supporting modules. On my Mac, I observed the following:
The first column of numbers is a unique count for distribution name and version.
This pattern continues until I kill the program. I have uploaded all of the response to the following gist: https://gist.github.com/lbe/42d647422b45fef1a638326c6618636a The only value of the content in gist, other than what I have identified above, is to show that the UA does not make a network call after the second call to ->next. I have a few more ideas to help localize the bug. I'll let you know what I find. Thanks, lbe |
None of the things that I thought would help me localize the error did much to help. Sorry lbe |
I'm not convinced this is a client issue, I would try to reduce it to direct ES scrolled searches. |
While researching a curious question this afternoon regarding Devel-* distributions, I came across what I believe to be a bug when trying to use the next iterator on a result set from a release query. If I use the caching as shown in the MetaCPAN::Client Summary with a while state as contained in the author_release.pl example, my loop never terminates. If I run the same code but without using the cache, it completes fine. My guess is that the bug is not in the MetaCPAN::Client code, but I don't have the time, or possibly skill :), to try to get to the root cause at this time.
Please see the following code that can be used to replicate the problem. I have run this code on both my Mac and a Debbie Jessie box with the same results. Details also provided below.
Thanks,
lbe
Run the program below to with a '-c' command line parameter to used a UA with caching.
Run without cache
This code ran to successful completion. It found 2745 unique distribution versions from the 2870 releases returned from the server
Run with cache
I had to ^C to cancel the loop. The 1926 is the number of unique distribution versions stored in
%rs
where as the 10049 is the number of loop iterations which is much larger than the 2745 in the no-cache case.When I initially discovered the behavior, I thought the problem was due to the iterator not terminating properly. If this were the case, then I would expect the count of unique distribution versions to max at 2,745 as show above.
I believe that the server returns a max of 1000 rows at a time. If so, it appears that there is a problem beginning with the 3rd pull from the server.
EDIT: I changed the search options from
'Devel-*'
to'Data-*'
. In this case, the server returned 5451 records with 5358 unique distribution versions when run with caching. When run with caching, the unique distribution stopped at 1980 and I had to ^C to cancel the program after the number of iterations was 6018. It appears that the problem is indeed related to the 3rd pull from the server**EDIT(2): I added
scroller_size => 100
to the options has of the release method the unique distribution versions for the caching only reached 198. The issue is definitely related to the 3rd update from the server.mcpan-client-test.pl
Machine Configuration Information:
Mac
Debian Jessie
The text was updated successfully, but these errors were encountered: