Subject: Re: [sup-devel] Will sup blow up after adding 10k sources?

From: Ben Walton <[email-masked]>
Date: Tue, 29 Jun 2010 09:15:56 -0400

Excerpts from Sascha Silbe's message of Tue Jun 29 04:54:22 -0400 2010:

Hi Sascha,

> Wouldn't it be better to (*) use small fixed source ids for
> SentManager/DraftManager and let SourceManager start above a number
> of reserved ids (say: 50)? Is there something in sup that depends on
> the non-special source ids not to have "holes" (or will waste
> resources in that case)?

I agree that this would have been a better choice early on.  Assign
the lowest possible id's to the Sent/Draft sources and then hand out
id's dynmaically from there.

> Another approach would be to make the SentManager/DraftManager
> source ids dynamic and add them to sources.yaml.

I'd have to look, but changing these id's after they've been used will
cause problems requiring a resync, I believe.

I'm sure others that have been more active in this part of the source
lately can provide more info too.

HTH.
-Ben
--
Ben Walton
Systems Programmer - CHASS
University of Toronto
C:416.407.5610 | W:416.978.4302

_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel

---

From: Sascha Silbe <[email-masked]>
Date: Tue, 29 Jun 2010 08:54:22 +0000

Hi!

While fixing the sup-dump vs. default sent source bug (see posted patch) I stumbled over the following pieces of code:
1. SentManager uses source_id of 9998 for the default sent source
   (lib/sup/sent.rb:52)
2. DraftManager uses a fixed source_id of 9999
   (lib/sup/draft.rb:13,49)
3. SourceManager skips the source_id of SentManager and DraftManager
   while computing the id for a new source (lib/sup/source.rb:203)

Does that mean sup will blow up once I have more than ~10k sources? I'm already at > 5k sources (containing > 680k messages, took > 2 days to import), so this isn't just an academic exercise...

Wouldn't it be better to (*) use small fixed source ids for SentManager/DraftManager and let SourceManager start above a number of reserved ids (say: 50)? Is there something in sup that depends on the non-special source ids not to have "holes" (or will waste resources in that case)?

Another approach would be to make the SentManager/DraftManager source ids dynamic and add them to sources.yaml.

Sascha

(*) Read: Would you accept a patch that implements that new logic?

--
http://sascha.silbe.org/
http://www.infra-silbe.de/
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel