From: <ma...@os...> - 2006-08-11 00:21:41
|
> Hi Mark, > > Occasionally I am experiencing a primary key violation error in the > trade-result transaction. I don't know the reason yet, but I am leaned to > believe that the more gentle isolation level applied to trade-result can > be behind these erros. Further investigation is needed. Please, see the > error below. > > pqxx SQL error: ERROR: duplicate key violates unique constraint > "pk_holding_history" > CONTEXT: SQL statement "INSERT INTO HOLDING_HISTORY ( HH_H_T_ID, HH_T_ID, > HH_BEFORE_QTY, HH_AFTER_QTY) VALUES ( $1 , $2 , $3 , 0)" > PL/pgSQL function "traderesultframe2" line 251 at SQL statement > > Query was: 'select * from > TradeResultFrame2(8793::IDENT_T,-1900::S_QTY_T,0::smallint,'PIKPRB > '::char(15),581769::TRADE_T,24.44::S_PRICE_T,800::S_QTY_T,0::smallint) as > (broker_id IDENT_T, buy_value numeric(12,2), cust_id IDENT_T, sell_value > numeric(12,2),tax_status smallint, trade_dts_year double precision, > trade_dts_month double precision,trade_dts_day double precision, > trade_dts_hour double precision,trade_dts_minute double precision, > trade_dts_second double precision)' > at BrokerageHouse::WorkerThread If we believe the database, it's an INSERT causing the problem. Perhaps there's a random number generation problem, or possibly an error assigning values to the SQL statement? > I just released new code to the repository. The main changes: > > - Mix logging > > The RTs are being recorded in a format similar to dbt2's. So, we could > adapt more easily the existing dbt2's scripts to our needs. The Market > Exchange emulator generates a file for recording the trade-result and > market-feed transactions; the Customer Emulator generates another file for > recording the other transactions. > > I have started to code a mix_analyzer based on dbt2's analyzer; it's > possible to have some output on the mix for now. I think it's necessary to > change something on the anaylzer since the current throughput is 'per > second', while dbt2 is 'per minute'. I'm not sure about that. > Since we have the mix logging separated in two files, before running > mix_analyzer.pl, we have to merge & sort the files; this command seems to > do this job: sort -n -t "," -k 1 ce_mix.log mee_mix.log -o mix.log. > > - Error logging > > The errors are being written to file and to screen. I have created a new > header file to contain the error classes. > Each transaction has a status fields that needs to be returned to the > driver; I have changed all transactions frames to set the status field. > > > I am trying to arrange a better system to run more realistics tests. My > noteebok is not affording the workload =D I have a system avaiable at OSDL. It's an IBM x440 system. I don't have drives attached to it yet but I could put something together. Would you like remote access? Mark |