barnyard2 icon indicating copy to clipboard operation
barnyard2 copied to clipboard

Barnyard2-1.13 adds contents of gen-msg.map to signature table on each restart

Open redbaron4 opened this issue 8 years ago • 0 comments

Version 1.13 (and also older ones in 1.1x series) process the gen-msg.map file on each restart and add all the entries listed there to the signature table even if those entries are already present. This leads to a bloated start-up time and an ever increasing signature table.

mysql> select count(*) from signature where sig_gid=116 and sig_sid=454;
+----------+
| count(*) |
+----------+
|     1433 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from signature;
+----------+
| count(*) |
+----------+
|   494898 |
+----------+
1 row in set (0.07 sec)

I came across a stored procedure which removes such duplicates. However, duplicates will be regenerated upon next restart which means the stored procedure should be run regularly.

A fix in the code would be better IMO

redbaron4 avatar Apr 18 '16 09:04 redbaron4