]> source.dussan.org Git - rspamd.git/commitdiff
Remove endless counter incrementing.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 6 Jun 2013 13:35:31 +0000 (14:35 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 6 Jun 2013 13:35:31 +0000 (14:35 +0100)
In some cases it is not enough to perform compare and exchange
and we still can get race condition in atomic incrementing.
Therefore, it is better to loose a history event than to
log error message each time.

src/roll_history.c

index 69f14176282ad428783077be4469878f9e51f07c..4206a6a8b9ba3e7ed778c6d85fa16e4fd9b42f76 100644 (file)
@@ -101,7 +101,8 @@ rspamd_roll_history_update (struct roll_history *history, struct worker_task *ta
                row->completed = FALSE;
        }
        else {
-               msg_err ("internal error with history roll occured, row number is invalid: %d", row_num);
+               /* Race condition */
+               history->cur_row = 0;
                return;
        }