Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] Will sup blow up after adding 10k sources?
@ 2010-06-29  8:54 Sascha Silbe
  2010-06-29 13:15 ` Ben Walton
  0 siblings, 1 reply; 2+ messages in thread
From: Sascha Silbe @ 2010-06-29  8:54 UTC (permalink / raw)
  To: sup-devel


[-- Attachment #1.1: Type: text/plain, Size: 1150 bytes --]

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/

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-29 13:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-29  8:54 [sup-devel] Will sup blow up after adding 10k sources? Sascha Silbe
2010-06-29 13:15 ` Ben Walton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox