Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
afsql: fixed retry_sql_inserts(1) isssue
When an insert failed(after retries), syslog-ng didn't drop the connection and thus an invalid transaction was kept in open state. When a new message arrived, syslog-ng wanted to append that to the invalid transaction, which caused failure and the message was dropped. The problem occured when retries was set to 1. if (self->failed_message_counter < self->num_retries - 1) // if (0 < 0) { // retry AND return false, which means to the caller // that the connection should be suspended } else { // drop msg AND return true, which means to the caller // that connection should be kept open } This is why a simple workaround (setting reties to 2) could solve this problem. fixes syslog-ng#469 Signed-off-by: Laszlo Budai <Laszlo.Budai@balabit.com>
- Loading branch information