[ts-gen] Compiling on an OS/X

Bill Pippin pippin at owlriver.net
Wed Jan 2 12:51:57 EST 2008


Bill,

With respect to the exception thrown during startup, complaining about
an inadequate sql isolation level:

> [lisa:~/trading-shim/shim-071228] wlloyd% ./shim --data
> terminate called after throwing an instance of  
> 'TradingShimDaemon1_0::TradingException::isolation_must_be_serial'
> Abort

The isolation level of the mysql database must be set to serializable; in
the docs, under Database Creation->Set the Dbms Isolation Level, at:

http://www.trading-shim.org/doc/ [currently drills to:]
http://www.trading-shim.org/doc/node36.html

you'll find, in part: 

> For safe operation, the shim program requires that the sql server run
> in ANSI mode, that is for mysql that the sql isolation level be changed
> from the default and oxymoronic level of REPEATABLE-READ to the
> safer level of SERIALIZABLE in order to prevent phantom reads.

> This is necessary to ensure that transactions are ACID, that is atomic,
> consistent, isolated, and durable.  The trading-shim checks for this
> property, and, by design, will not start without it.

The docs conclude by suggesting that, in order to change the sql isolation
level, you apply the following patch [occurring also as sql/mysql.iso.patch]
to your my.cnf file.

*** my.cnf-OLD  2007-04-20 16:10:13.000000000 -0400
--- my.cnf      2007-04-20 16:10:13.000000000 -0400
***************
*** 9,14 ****
--- 9,18 ----
  user=mysql
  basedir=/var/lib

+ [mysqld]
+ transaction-isolation = SERIALIZABLE
+
+
  [mysqld_safe]
  log-error=/var/log/mysqld.log
  pid-file=/var/run/mysqld/mysqld.pid

If you apply the patch and restart the mysql server, the trading shim
should then be able to connect to the database properly.

Thanks,

Bill Pippin


More information about the ts-general mailing list