loadtest.c: when deleting, always make sure we deleted 1 message.
authorArt Cancro <ajc@citadel.org>
Sun, 27 Aug 2023 00:29:07 +0000 (20:29 -0400)
committerArt Cancro <ajc@citadel.org>
Sun, 27 Aug 2023 00:29:07 +0000 (20:29 -0400)
commitc39d3365fb22b731ac482e00a1af58128e0f6c4b
treec7d08607992fd69fa27c5e240ee0fe7a86018ab9
parent691daa23023ed0daaaa2a8efe9115883766fb5c7
loadtest.c: when deleting, always make sure we deleted 1 message.

If there are multiple loadtest processes running -- and that's really
the whole idea -- we will often try to delete a message that was already
deleted by another process.  That's not an error condition, but it would
cause posts to outnumber deletes and the rooms would grow endlessly.  So
if we didn't successfully delete something, we go back and try deleting
another one.

Fun fact: the algorithm used to decide which message to delete is the same
algorithm used in the 'fortune' program.
citadel/utils/loadtest.c