mariadb/ndb/include/util
unknown f788654012 [PATCH] BUG#30379 Better randomise time before retry in timeout check (DBTC)
timoOutLoopStartLab() checks if any transactions have been delayed
for so long that we are forced to perform some action (e.g. abort,
resend etc).

It is *MEANT* to (according to the comment):
> To avoid aborting both transactions in a deadlock detected by time-out
> we insert a random extra time-out of upto 630 ms by using the lowest
> six bits of the api connect reference.
> We spread it out from 0 to 630 ms if base time-out is larger than 3 sec,
> we spread it out from 0 to 70 ms if base time-out is smaller than 300 msec,
> and otherwise we spread it out 310 ms.

The comment (as all do) lies.

the API connect reference is not very random, producing incredibly
predictable "random" numbers. This could lead to both txns being
aborted instead of just one.

Before:
timeout value: 123 3
timeout value: 122 2
timeout value: 122 2
timeout value: 122 2
timeout value: 123 3

After:
timeout value: 127 7
timeout value: 126 6
timeout value: 129 9
timeout value: 139 19
timeout value: 137 17
timeout value: 151 31
timeout value: 130 10
timeout value: 132 12

Index: ndb-work/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
===================================================================


ndb/src/common/util/Makefile.am:
  BUG#30379 Better randomise time before retry in timeout check (DBTC)
ndb/include/util/ndb_rand.h:
  BUG#30379 Better randomise time before retry in timeout check (DBTC)
ndb/src/common/util/ndb_rand.c:
  BUG#30379 Better randomise time before retry in timeout check (DBTC)
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
  BUG#30379 Better randomise time before retry in timeout check (DBTC)
2007-09-25 12:01:23 +02:00
..
BaseString.hpp Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11 2007-04-11 15:21:11 +02:00
basestring_vsnprintf.h Many files: 2006-12-23 20:17:15 +01:00
Bitmask.hpp Many files: 2006-12-23 20:17:15 +01:00
ConfigValues.hpp my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
File.hpp Merge willster.(none):/home/stewart/Documents/MySQL/5.0/ndb 2006-12-28 22:53:21 +11:00
InputStream.hpp Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
md5_hash.hpp Many files: 2006-12-23 20:17:15 +01:00
ndb_opts.h Many files: 2006-12-23 20:17:15 +01:00
ndb_rand.h [PATCH] BUG#30379 Better randomise time before retry in timeout check (DBTC) 2007-09-25 12:01:23 +02:00
NdbAutoPtr.hpp Many files: 2006-12-23 20:17:15 +01:00
NdbOut.hpp Many files: 2006-12-23 20:17:15 +01:00
NdbSqlUtil.hpp Many files: 2006-12-23 20:17:15 +01:00
OutputStream.hpp Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca-ndb_restore 2007-03-09 00:55:46 +07:00
Parser.hpp Many files: 2006-12-23 20:17:15 +01:00
Properties.hpp Many files: 2006-12-23 20:17:15 +01:00
random.h Many files: 2006-12-23 20:17:15 +01:00
SimpleProperties.hpp Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
socket_io.h Many files: 2006-12-23 20:17:15 +01:00
SocketAuthenticator.hpp Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
SocketClient.hpp Bug #25487 deleting ndb_cluster_connection object takes long time 2007-01-23 17:07:09 +11:00
SocketServer.hpp Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
UtilBuffer.hpp Many files: 2006-12-23 20:17:15 +01:00
uucode.h Many files: 2006-12-23 20:17:15 +01:00
Vector.hpp Bug#26176 NdbObjectIdMap::expand unable to expand!! mysqld got signal 11 2007-04-11 15:21:11 +02:00
version.h Many files: 2006-12-23 20:17:15 +01:00