@@ -207,7 +207,7 @@ def exec_tx(self, tx_block, aggname_prefix, conn_i):
207207 if status != TRANSACTION_STATUS_IDLE :
208208 yield from cur .execute ('rollback' )
209209
210- yield from tx_block (conn , cur , agg )
210+ yield from tx_block (conn , cur , agg , conn_i )
211211 agg .finish_tx ('commit' )
212212
213213 except psycopg2 .Error as e :
@@ -231,7 +231,7 @@ def exec_tx(self, tx_block, aggname_prefix, conn_i):
231231 print ("We've count to infinity!" )
232232
233233 @asyncio .coroutine
234- def transfer_tx (self , conn , cur , agg ):
234+ def transfer_tx (self , conn , cur , agg , conn_i ):
235235 amount = 1
236236 # to avoid deadlocks:
237237 from_uid = random .randint (1 , self .n_accounts - 2 )
@@ -250,14 +250,14 @@ def transfer_tx(self, conn, cur, agg):
250250 yield from cur .execute ('commit' )
251251
252252 @asyncio .coroutine
253- def total_tx (self , conn , cur , agg ):
254- yield from cur .execute (' select sum(amount) from bank_test' )
253+ def total_tx (self , conn , cur , agg , conn_i ):
254+ yield from cur .execute (" select sum(amount), count(*), count(uid), current_setting('multimaster.node_id') from bank_test" )
255255 total = yield from cur .fetchone ()
256256 if total [0 ] != self .total :
257257 agg .isolation += 1
258258 self .total = total [0 ]
259259 print (self .oops )
260- print ('Isolation error, total = ' , total [ 0 ] )
260+ print (datetime . datetime . utcnow (), 'Isolation error, total = ' , total , ', node ' , conn_i + 1 )
261261 # yield from cur.execute('select * from mtm.get_nodes_state()')
262262 # nodes_state = yield from cur.fetchall()
263263 # for i, col in enumerate(self.nodes_state_fields):
0 commit comments