Commit graph

1295 commits

Author SHA1 Message Date
knielsen@ymer.(none)
45e18df811 After-merge fixes. 2007-04-25 15:02:23 +02:00
knielsen@ymer.(none)
ae8f9ac9f3 Merge ymer.(none):/usr/local/mysql/mysql-5.0-ndb-bug27370
into  ymer.(none):/usr/local/mysql/mysql-5.1-new-ndb
2007-04-24 09:00:13 +02:00
jonas@perch.ndb.mysql.com
c1946a59b9 ndb -
remove compiler warning/error
2007-03-27 16:47:08 +02:00
jonas@perch.ndb.mysql.com
050dcdee40 Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
2007-03-27 16:16:02 +02:00
jonas@perch.ndb.mysql.com
52469dee16 ndb -
reformat code a bit to be more compiler friendly
2007-03-27 16:15:22 +02:00
jonas@perch.ndb.mysql.com
924036859f Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
2007-03-27 16:00:15 +02:00
jonas@perch.ndb.mysql.com
3aa1a59a77 ndb -
remove compiler warning from last changeset
2007-03-27 15:57:36 +02:00
jonas@perch.ndb.mysql.com
d50539b624 Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
2007-03-27 14:33:18 +02:00
jonas@perch.ndb.mysql.com
e5faf16bc0 ndb - bug#27466 nf during nr can leave cluster in inconsistent state (recommit in 5.1)
Fix race condition between NODE_FAILREP and local INCL_NODEREQ loop
    Also retry on ZNODE_START_DISALLOWED_ERROR
2007-03-27 14:27:43 +02:00
tomas@whalegate.ndb.mysql.com
d4982247cf Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-03-26 20:57:10 +02:00
pekka@clam.(none)
5f061a7e5c Merge clam.ndb.mysql.com:/export/space/pekka/ndb/version/my51-ndb
into  clam.ndb.mysql.com:/export/space/pekka/ndb/version/my51-bug24028
2007-03-25 15:06:19 +02:00
tomas@whalegate.ndb.mysql.com
d5f63f25c5 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-03-23 21:50:57 +01:00
tomas@whalegate.ndb.mysql.com
78dce2dd97 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-single-user
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-03-23 17:17:44 +01:00
tomas@whalegate.ndb.mysql.com
df278bd605 BUG#27254: Single User Mode.Mysql hangs if it tries delete a ndb table 2007-03-23 17:12:06 +01:00
tomas@whalegate.ndb.mysql.com
aadd161d65 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca-single-user
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-03-23 17:09:10 +01:00
tomas@whalegate.ndb.mysql.com
9af7e2c5a4 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-telco-gca-single-user
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca-single-user
2007-03-23 17:08:33 +01:00
tomas@whalegate.ndb.mysql.com
f4fed734c6 Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca-single-user
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-03-23 14:17:08 +01:00
tomas@whalegate.ndb.mysql.com
8823a1a29f correction of merge 2007-03-23 14:16:31 +01:00
tomas@whalegate.ndb.mysql.com
9899df36bd Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-telco-gca-single-user
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-telco-gca-single-user
2007-03-23 14:06:00 +01:00
tomas@whalegate.ndb.mysql.com
05984c7aeb Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
2007-03-23 08:20:36 +01:00
stewart@willster.(none)
21e9072775 WL#3704 mgmapi timeouts: fix compile warning 2007-03-23 15:25:58 +11:00
stewart@mysql.com[stewart]
7256b93b2e [PATCH] WL#3704 mgmapi timeouts: Fix error insert to NOT_STARTED nodes
Turns out I broke it.

Index: ndb-work/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
===================================================================
2007-03-22 22:36:43 +11:00
stewart@mysql.com[stewart]
f40d852fcc [PATCH] WL#3704 mgmapi timeouts: Print full error from mgmd in NdbRestarter errors
Turns out they can be useful in working out what's going wrong.

Index: ndb-work/storage/ndb/test/src/NdbRestarter.cpp
===================================================================
2007-03-22 22:36:31 +11:00
stewart@mysql.com[stewart]
4df1bd9c10 [PATCH] WL#3704 mgmapi timeouts: Fix infinite (0) timeout for ndb_logevent_get_next
Index: ndb-work/storage/ndb/src/mgmapi/ndb_logevent.cpp
===================================================================
2007-03-22 22:36:19 +11:00
stewart@mysql.com[stewart]
471469a674 [PATCH] WL#3704 mgmapi timeouts: For mgm server, have timeout per operation, not for entire connection (i.e. fix the bug)
for TransporterRegistry, keep connection to management server alive.


Index: ndb-work/storage/ndb/include/util/InputStream.hpp
===================================================================
2007-03-22 22:36:07 +11:00
stewart@mysql.com[stewart]
75cff8cd26 [PATCH] WL#3704 mgmapi timeouts: Correct cpc client usage of Socket Input/OutputStream for timeouts
Index: ndb-work/storage/ndb/include/util/InputStream.hpp
===================================================================
2007-03-22 22:35:55 +11:00
stewart@mysql.com[stewart]
2d11a87978 [PATCH] WL#3704 mgmapi timeouts: Add MGMAPI tests to autotest daily run
Index: ndb-work/storage/ndb/test/run-test/daily-basic-tests.txt
===================================================================
2007-03-22 22:35:43 +11:00
stewart@mysql.com[stewart]
acb61e810c [PATCH] WL#3704 mgmapi timeouts: update NDBAPI usage of mgmapi for timeouts
Default timout of 30secs for ConfigRetriever

Default timout of 5sec for use by Transporter (ports etc).

And Ndb_cluster_connection::set_timeout() api for setting timeout from
NDBAPI applications. Should be called before connect. e.g.

c.set_timeout(4200);
c.connect();

Index: ndb-work/storage/ndb/include/mgmcommon/ConfigRetriever.hpp
===================================================================
2007-03-22 22:35:31 +11:00
stewart@mysql.com[stewart]
420e9ed86e [PATCH] WL#3704 mgmapi timeouts: use timeouts in mgm client
as side effect - turbo accellerator patch for ndb_mgm - sholud make it quicker... so that 4mhz cpu will seem even faster.

Index: ndb-work/storage/ndb/src/mgmclient/CommandInterpreter.cpp
===================================================================
2007-03-22 22:35:19 +11:00
stewart@mysql.com[stewart]
c537c27796 [PATCH] WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
use portable method, getting milliseconds between calls - Linux would
let us do funky stuff by getting the timeout from select(2). Everywhere
else sucks and doesn't let us do that :(

Index: ndb-work/storage/ndb/include/util/InputStream.hpp
===================================================================
2007-03-22 22:35:07 +11:00
stewart@mysql.com[stewart]
298719def2 [PATCH] WL#3704 mgmapi timeouts: clarify multiple mgmd connect timeout semantics
Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
===================================================================
2007-03-22 22:34:55 +11:00
stewart@mysql.com[stewart]
e77a4480ab [PATCH] WL#3704 mgmapi timeouts: consolidate NdbMgmHandle timeouts into one
Only one timeout value is needed. Also saves 8bytes per NdbMgmHandle :)

Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
===================================================================
2007-03-22 22:34:43 +11:00
stewart@mysql.com[stewart]
450d89651c [PATCH] WL#3704 mgmapi timeouts: Test for structured events timeouts (with err injection).
Index: ndb-work/storage/ndb/test/ndbapi/testMgm.cpp
===================================================================
2007-03-22 22:34:31 +11:00
stewart@mysql.com[stewart]
6ce049dcb6 [PATCH] WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
Index: ndb-work/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
===================================================================
2007-03-22 22:34:19 +11:00
stewart@mysql.com[stewart]
398d97aae0 [PATCH] WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates.
Also add an ERROR_codes.txt file for mgmd

Index: ndb-work/storage/ndb/src/mgmsrv/ERROR_codes.txt
===================================================================
2007-03-22 22:34:08 +11:00
stewart@mysql.com[stewart]
e8121e50e8 [PATCH] WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
In ndb_mgm_call, add checks for expired timeout in (Input|Output)Stream.
In case of timeout, we set NdbMgmHandle->last_error and return NULL.

In api calls not using ndb_mgm_call (or using it in conjunction with
own IO), they'll need to check for timeouts manually. Macros are provided
to do this.

Add ndb_mgm_disconnect_quiet(h) to disconnect without checking errors
(so we don't clobber NdbMgmHandle->last_error). This helps us provide
the *consistent* semantic that on timeout we leave the NdbMgmHandle
*disconnected*. We check for this in testMgm.

Change CHECK_REPLY in mgmapi to also check for set error in handle->last_error
This will pick up the ETIMEDOUT errors and return them to client (through
returning correct failure code for API call and setting NdbMgmHandle error).
Applications written to MGMAPI before this patch will behave as before,
and even hopefully check get_last_error and report the error back to the
end user!

Adding the last CHECK_TIMEDOUT_RET and delete in ndb_mgm_call() we
slightly change behaviour of mgmapi. Previously, if disconnect
midway through a reply, where there were only optional parameters left,
we'd get a Properties object from ndb_mgm_call() containing NULLs for
the optional parameters, leading to interesting error messages. This
enables the returning of the *real* message and actually improves the API
without breaking compatibility.

ndb_mgm_start_signallog
ndb_mgm_stop_signallog
ndb_mgm_log_signals
ndb_mgm_set_trace
ndb_mgm_insert_error
ndb_mgm_set_int64_parameter [1]
ndb_mgm_set_string_parameter [1]
ndb_mgm_purge_stale_sessions [2]
 - return error code on error during ndb_mgm_call

TODO:
ndb_mgm_report_event [2]

[1] marked for removal, unused.
[2] return codes incorrect in CHECK_HANDLE/CONNECTED. undocumented.


Server side:
 in Services (per session) add macro for injecting timeout error
 (just waiting 10 seconds before continuing... it does work!)

 We inject these errors in a number of critical places - including
 the tricky api functions that don't just use ndb_mgm_call but do
 their own thing (get_config, get_status and friends)

ATRT:
 Expand testMgm to add timout tests for API. Fully automated.
 *THEORETICALLY* timing dependent - an ultra-slow network will
 cause problems and "fake" failures... I welcome other solutions.

 Tests aren't exhaustive, but cover the generics and the tricky bits.
 Also test some calling semantics (incl disconnected on error).

 It is encouraged to add *more* mgmapi tests, not less :)

InputStream:
  Fix where timedout error is set


Index: ndb-work/storage/ndb/src/mgmapi/mgmapi.cpp
===================================================================
2007-03-22 22:33:56 +11:00
stewart@mysql.com[stewart]
64361ee36f [PATCH] WL#3704 mgmapi timeouts: Add bool timeout flag to Streams
Index: ndb-work/storage/ndb/include/util/InputStream.hpp
===================================================================
2007-03-22 22:33:43 +11:00
stewart@mysql.com[stewart]
c2f0a25dc4 [PATCH] WL#3704 mgmapi timeouts: Rename inputstream timeout
Index: ndb-work/storage/ndb/include/util/InputStream.hpp
===================================================================
2007-03-22 22:33:31 +11:00
stewart@mysql.com[stewart]
36888199ac [PATCH] WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
Add not so neat set_timeout call to make testMgm work

Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
===================================================================
2007-03-22 22:33:19 +11:00
stewart@mysql.com[stewart]
395a24409d [PATCH] WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
Add error injection either for this connection or for whole server.

Currently nothing for injecting errors into *another* connection... but that's
perhaps getting tricky-dicky for this point in time. Perhaps needed for events
if we don't do anything fancy.

Index: ndb-work/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
===================================================================
2007-03-22 22:33:07 +11:00
stewart@mysql.com[stewart]
272779e71e [PATCH] WL#3704 mgmapi timeouts: use NdbMgmHandle write_timeout
Start using the write_timeout we already have in NdbMgmHandle

Index: ndb-work/storage/ndb/src/mgmapi/mgmapi.cpp
===================================================================
2007-03-22 22:32:54 +11:00
jonas@perch.ndb.mysql.com
05a8790f0b Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
2007-03-22 11:23:47 +01:00
jonas@perch.ndb.mysql.com
4a1c8d296b Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
2007-03-22 11:21:26 +01:00
jonas@perch.ndb.mysql.com
155e3d1139 ndb -
fix testprg
2007-03-22 11:20:38 +01:00
jonas@perch.ndb.mysql.com
0e1974d2bf ndb - fix test prg 2007-03-22 11:17:57 +01:00
tomas@whalegate.ndb.mysql.com
753bc96eca Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2007-03-22 10:33:26 +01:00
pekka@clam.(none)
2082a9e35b Merge clam.ndb.mysql.com:/export/space/pekka/ndb/version/my50-bug24028
into  clam.ndb.mysql.com:/export/space/pekka/ndb/version/my51-bug24028
2007-03-22 07:40:04 +01:00
tomas@whalegate.ndb.mysql.com
6e7528bd34 Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
2007-03-22 05:45:17 +01:00
tsmith@quadxeon.mysql.com
54e7bc8daa Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1
into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
2007-03-22 01:04:39 +01:00
tomas@poseidon.mysql.com
e1cd5c67dc Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb
into  poseidon.mysql.com:/home/tomas/mysql-5.1-new-ndb
2007-03-21 16:34:23 +01:00