user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] msgmap: add limit to response for NNTP
@ 2018-04-24 19:43 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2018-04-24 19:43 UTC (permalink / raw)
  To: meta

All callers in expect to iterate through results.  This
was causing unfairness when fetching large ranges via XHDR
as rtin does :<

Fixes: b8c41362f2a5c8fc "nntp: simplify the long_response API"
---
 lib/PublicInbox/Msgmap.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/PublicInbox/Msgmap.pm b/lib/PublicInbox/Msgmap.pm
index 192e311..fdc71e4 100644
--- a/lib/PublicInbox/Msgmap.pm
+++ b/lib/PublicInbox/Msgmap.pm
@@ -199,7 +199,7 @@ sub msg_range {
 	my $attr = { Columns => [] };
 	my $mids = $dbh->selectall_arrayref(<<'', $attr, $$beg, $end);
 SELECT num,mid FROM msgmap WHERE num >= ? AND num <= ?
-ORDER BY num ASC
+ORDER BY num ASC LIMIT 1000
 
 	$$beg = $mids->[-1]->[0] + 1 if @$mids;
 	$mids
-- 
EW


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-24 19:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-24 19:43 [PATCH] msgmap: add limit to response for NNTP Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).