[ts-gen] Debugging intermittent lost posts [Was: Do I really need to ...]

Ken Feng kfmfe04 at gmail.com
Mon Sep 14 21:27:16 EDT 2009


On 9/15/09, Bill Pippin <pippin at owlriver.net> wrote:
> Are the messages you're concerned about distinct, that is not
> duplicates?  I ask because the declaration for the OrderStatus
> table includes the following unique key constraints:
>
>     ...
>     unique key(acc, perm,                 status, filled, remaining),
>     unique key(acc, client_id, order_tag, status, filled, remaining),
>     ...

Nils,

If it turns out that duplicate OrderStatus rows was causing your
problems (I had issues with this feature initially - I thought it to
be too "low level", initially, for my uses), one solution appears to
be to ORDER BY uid DESC LIMIT 1 to get the latest row, once you filter
in your WHERE statement.  I filter on perm.

I personally use the OrderStatus table to get the filled, remaining,
and avg_fill columns.  I use the 'perm' field to look into this table
(ShimText/cout: 3/3/6, 12th field), and tracing back to 'var' in the
CreateEvent table via a join on client_id and order_tag.

- Ken


More information about the ts-general mailing list