Article View: news.admin.peering
Article #1649Re: Renumber newsgroups by post date
From: Matija Nalis
Date: Fri, 28 Apr 2023 13:11
Date: Fri, 28 Apr 2023 13:11
74 lines
4493 bytes
4493 bytes
On Tue, 25 Apr 2023 09:34:09 GMT, Eli <eliistheman@gmail.com> wrote: > On 23 Apr 2023 at 18:08:22 CEST, "Frank" <franky@xxx.yyy> wrote: >> If a server renumbers its articles, its readers would need to throw out >> their newsrc and show everything as unread. > > It is a new server and has no readers yet, so that isn't a problem. I don't think sorting the history file will help in your case. IIRC (but it has been some time, so take this with a grain of salt), in tradspool, each newsgroup is a separate directory, and each message is stored in separate file, whose filename is the number of the article. So e.g. /var/spool/inn2/news/admin/peering/1234 will be a name of file for message number 1234 in `news.admin.peering`. Message 1233 in the file with same name would be message shown before it, and 1235 message after it. If you want them to be in chronological order (so `article 1233` with show OLDER message then `article 1234`), you'll need to rename those files in such order. So if you do not want to involve another server; to do such renumber, one would need to (hopefully I'm not forgetting important step): - stop/pause inn - for each group, rename files so their numbers sequentially follow the chronological order of `Date` headers in their content (you might need to write a relatively simple script for that; I don't know if any exist already) - do "ctlinnd renumber ''" to update active file with new low/high watermarks - rm old tradindexed overviews (just to be safe) & force tradindexed overview rebuild from scratch for each group. In it's most simple case, Note that due to need to open & parse at least dozen lines from each of 300M files, and then do sort & mass-rename and finally to rebuild overviews, it will likely also take significant time. Depending on the underlying storage you might be able to gain speed increase via parallelizing this process by processing multiple groups at the same time. Or you might not (e.g. in HDD case, it is quite possible that disk thrashing would make it much slower instead if you try to parallelize) In more advanced case (e.g. if your overview records are fine and not suspect; you could probably parse them instead of article files to gain speedup; that might make the script more complicated, though) >> - use the sorted list to feed articles into the new server > > With 300,000,000 articles, the server is quite large and transferring these > articles to another server over a single connection takes forever. Usin other server is the alternative, yes. You can run it in parallel over multiple connections, but only per-group parallelism (not at article level!). I.e. you must feed all articles in news.admin.peering sequentially in wanted chronological order, but you can feed news.software.nntp (and any number of other groups) at the same time (but articles in each group must be fed sequentially). Using CNFS on new server might make it faster too (but it has its own quirks to be aware of). > Sorting the history file by post date is no problem, but is it possible to > rebuild the overview databases based on this sorted history file? history file is used to detect duplicate articles when receiving them so they can be promptly refused. If is AFAIR not exposed to users otherwise. What is shown to NNRP users IIRC depends on per-group overview databases (tradindexed in your case?) e.g. via `XOVER 1234-`, which in turn depend on how the articles are numbered in spool itself (determined by filenames in case of tradspool) e.g. via `ARTICLE 1234`. -- Opinions above are GNU-copylefted.
Technical Details
Message-ID:
<slrnu4nhfu.t0i.mnalis-news@leia.home.lan>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mailReferences:
<7Qb1M.3786652$nwq3.3523857@fx13.ams4> <20230423160822.Aq0OKbfG2jj0@sewer.dizum.com> <l8N1M.4640532$miq3.438385@fx02.ams4>Show Full Headers
Complete Article Headers
Message-ID: <slrnu4nhfu.t0i.mnalis-news@leia.home.lan> Subject: Re: Renumber newsgroups by post date Date: Fri, 28 Apr 2023 15:11:26 +0200 From: Matija Nalis <mnalis-news@voyager.hr> References: <7Qb1M.3786652$nwq3.3523857@fx13.ams4> <20230423160822.Aq0OKbfG2jj0@sewer.dizum.com> <l8N1M.4640532$miq3.438385@fx02.ams4> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail Newsgroups: news.admin.peering Organization: CARNet, Croatia Sender: mnalis@public.hr Injection-Info: news1.carnet.hr; posting-host="185.80.195.78"; logging-data="2522178"; mail-complaints-to="abuse@CARNet.hr" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:lFfrXNbaJVynILhpJlW9BAjWcD8=