[packet-o-matic] A note about commit 339
Guy Martin
gmsoft at tuxicoman.be
Sat Aug 29 15:52:10 CEST 2009
Hi all,
As you may have noticed, I've added timestamp support in datastores. This means that instead of saving the string representation of the time in the database, it will save it in binary format. This make it easier for comparison and handling in general.
However, there is one downside to this, the existing datasets won't work with the new version and updating existing SQL tables isn't an easy task. The easiest solution is to simply create a new dataset by using a different datastore path.
Since sqlite doesn't support timestamps as native types, I simply saved the value in epoch (seconds since 1970). You can get a text representation of this value by simply using a SQL query such as 'SELECT datetime(time_column, "unixepoch") from table;'.
In this commit, I've also added the busy handler for datastore_sqlite. This means that you shouldn't get a failure if you are currently doing an operation with your sqlite database while packet-o-matic tries to write into it. However, this may delay the processing thread for quite an extensive period of time and it may not be acceptable if you are processing a lot of data at high speed. There is unfortunately no workaround for this. The best solution is to use another datastore.
Moreover, I've fixed a memory leak in target_http. If you are heavily using it, it's strongly suggested that you upgrade.
As usual, if you have bugs/comments/questions/feature requests, don't hesitate to contact me.
Cheers,
Guy
More information about the packet-o-matic
mailing list