1. 22 Mar, 2007 27 commits
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: update NDBAPI usage of mgmapi for timeouts · 0da1f339
      unknown authored
      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
      ===================================================================
      
      
      storage/ndb/include/mgmcommon/ConfigRetriever.hpp:
        WL#3704 mgmapi timeouts: update NDBAPI usage of mgmapi for timeouts
      storage/ndb/include/ndbapi/ndb_cluster_connection.hpp:
        WL#3704 mgmapi timeouts: update NDBAPI usage of mgmapi for timeouts
      storage/ndb/src/common/mgmcommon/ConfigRetriever.cpp:
        WL#3704 mgmapi timeouts: update NDBAPI usage of mgmapi for timeouts
      storage/ndb/src/common/transporter/TransporterRegistry.cpp:
        WL#3704 mgmapi timeouts: update NDBAPI usage of mgmapi for timeouts
      storage/ndb/src/ndbapi/ndb_cluster_connection.cpp:
        WL#3704 mgmapi timeouts: update NDBAPI usage of mgmapi for timeouts
      0da1f339
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: use timeouts in mgm client · 89587cff
      unknown authored
      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
      ===================================================================
      
      
      storage/ndb/src/mgmclient/CommandInterpreter.cpp:
        WL#3704 mgmapi timeouts: use timeouts in mgm client
      89587cff
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request · 41c364e7
      unknown authored
      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
      ===================================================================
      
      
      storage/ndb/include/util/InputStream.hpp:
        WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
      storage/ndb/include/util/OutputStream.hpp:
        WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
      storage/ndb/include/util/socket_io.h:
        WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
      storage/ndb/src/common/util/InputStream.cpp:
        WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
      storage/ndb/src/common/util/OutputStream.cpp:
        WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
      storage/ndb/src/common/util/socket_io.cpp:
        WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
      storage/ndb/src/mgmsrv/Services.cpp:
        WL#3704 mgmapi timeouts: Change to have total timeout for call, not per request
      41c364e7
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: clarify multiple mgmd connect timeout semantics · 97b6cc1a
      unknown authored
      Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
      ===================================================================
      
      
      storage/ndb/include/mgmapi/mgmapi.h:
        WL#3704 mgmapi timeouts: clarify multiple mgmd connect timeout semantics
      storage/ndb/src/mgmapi/mgmapi.cpp:
        WL#3704 mgmapi timeouts: clarify multiple mgmd connect timeout semantics
      97b6cc1a
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: consolidate NdbMgmHandle timeouts into one · 9691712d
      unknown authored
      Only one timeout value is needed. Also saves 8bytes per NdbMgmHandle :)
      
      Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
      ===================================================================
      
      
      storage/ndb/include/mgmapi/mgmapi.h:
        WL#3704 mgmapi timeouts: consolidate NdbMgmHandle timeouts into one
      storage/ndb/src/mgmapi/mgmapi.cpp:
        WL#3704 mgmapi timeouts: consolidate NdbMgmHandle timeouts into one
      9691712d
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: Test for structured events timeouts (with err injection). · 989df529
      unknown authored
      Index: ndb-work/storage/ndb/test/ndbapi/testMgm.cpp
      ===================================================================
      
      
      storage/ndb/test/ndbapi/testMgm.cpp:
        WL#3704 mgmapi timeouts: Test for structured events timeouts (with err injection).
      989df529
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts · 1b9b780e
      unknown authored
      Index: ndb-work/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
      ===================================================================
      
      
      storage/ndb/src/mgmsrv/ERROR_codes.txt:
        WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
        WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
      storage/ndb/src/mgmsrv/Services.cpp:
        WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
      storage/ndb/test/ndbapi/testMgm.cpp:
        WL#3704 mgmapi timeouts: manipulate some things to get infrastructure for event timeouts
      1b9b780e
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates. · 4b2c073d
      unknown authored
      Also add an ERROR_codes.txt file for mgmd
      
      Index: ndb-work/storage/ndb/src/mgmsrv/ERROR_codes.txt
      ===================================================================
      
      
      storage/ndb/src/mgmsrv/Services.cpp:
        WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates.
      storage/ndb/test/ndbapi/testMgm.cpp:
        WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates.
      storage/ndb/src/mgmsrv/ERROR_codes.txt:
        WL#3704 mgmapi timeouts: renumber mgmd err insert to not have duplicates.
      4b2c073d
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi · b4ae169e
      unknown authored
      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
      ===================================================================
      
      
      storage/ndb/src/common/util/InputStream.cpp:
        WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
      storage/ndb/src/mgmapi/mgmapi.cpp:
        WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
      storage/ndb/src/mgmapi/mgmapi_internal.h:
        WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
      storage/ndb/src/mgmsrv/Services.cpp:
        WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
      storage/ndb/test/ndbapi/testMgm.cpp:
        WL#3704 mgmapi timeouts: Return sane errors for timeout in mgmapi
      b4ae169e
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: Add bool timeout flag to Streams · 7593933e
      unknown authored
      Index: ndb-work/storage/ndb/include/util/InputStream.hpp
      ===================================================================
      
      
      storage/ndb/include/util/InputStream.hpp:
        WL#3704 mgmapi timeouts: Add bool timeout flag to Streams
      storage/ndb/include/util/OutputStream.hpp:
        WL#3704 mgmapi timeouts: Add bool timeout flag to Streams
      storage/ndb/src/common/util/InputStream.cpp:
        WL#3704 mgmapi timeouts: Add bool timeout flag to Streams
      storage/ndb/src/common/util/OutputStream.cpp:
        WL#3704 mgmapi timeouts: Add bool timeout flag to Streams
      storage/ndb/src/mgmsrv/Services.cpp:
        WL#3704 mgmapi timeouts: Add bool timeout flag to Streams
      storage/ndb/test/ndbapi/testMgm.cpp:
        WL#3704 mgmapi timeouts: Add bool timeout flag to Streams
      7593933e
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: Rename inputstream timeout · 7b801263
      unknown authored
      Index: ndb-work/storage/ndb/include/util/InputStream.hpp
      ===================================================================
      
      
      storage/ndb/include/util/InputStream.hpp:
        WL#3704 mgmapi timeouts: Rename inputstream timeout
      storage/ndb/src/common/util/InputStream.cpp:
        WL#3704 mgmapi timeouts: Rename inputstream timeout
      7b801263
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms) · 47680538
      unknown authored
      Add not so neat set_timeout call to make testMgm work
      
      Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
      ===================================================================
      
      
      storage/ndb/include/mgmapi/mgmapi.h:
        WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
      storage/ndb/src/mgmapi/mgmapi.cpp:
        WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
      storage/ndb/test/ndbapi/testMgm.cpp:
        WL#3704 mgmapi timeouts: add ndb_mgm_set_timeout(h,ms)
      47680538
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: Add ndb_mgmd error injection · 5f1b2c16
      unknown authored
      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
      ===================================================================
      
      
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
        WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
      storage/ndb/src/mgmsrv/MgmtSrvr.hpp:
        WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
      storage/ndb/src/mgmsrv/Services.cpp:
        WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
      storage/ndb/src/mgmsrv/Services.hpp:
        WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
      storage/ndb/test/ndbapi/testMgm.cpp:
        WL#3704 mgmapi timeouts: Add ndb_mgmd error injection
      5f1b2c16
    • unknown's avatar
      [PATCH] WL#3704 mgmapi timeouts: use NdbMgmHandle write_timeout · 442f631f
      unknown authored
      Start using the write_timeout we already have in NdbMgmHandle
      
      Index: ndb-work/storage/ndb/src/mgmapi/mgmapi.cpp
      ===================================================================
      
      
      storage/ndb/src/mgmapi/mgmapi.cpp:
        WL#3704 mgmapi timeouts: use NdbMgmHandle write_timeout
      442f631f
    • unknown's avatar
      Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.1-new-ndb · 92329549
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      storage/ndb/test/ndbapi/testNodeRestart.cpp:
        Auto merged
      92329549
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/51-telco-gca · 8b05892d
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new-ndb
      
      
      storage/ndb/test/ndbapi/testNodeRestart.cpp:
        Auto merged
      8b05892d
    • unknown's avatar
      ndb - · 9f8dc4e0
      unknown authored
        fix testprg
      
      
      storage/ndb/test/ndbapi/testNodeRestart.cpp:
        fix testprg
      9f8dc4e0
    • unknown's avatar
      ndb - fix test prg · 5ad23735
      unknown authored
      5ad23735
    • unknown's avatar
      Merge perch.ndb.mysql.com:/home/jonas/src/50-work · 7c1b5d87
      unknown authored
      into  perch.ndb.mysql.com:/home/jonas/src/51-telco-gca
      
      7c1b5d87
    • unknown's avatar
      ndb - · 3ad18a30
      unknown authored
        fix test prg
      
      
      ndb/test/ndbapi/testNodeRestart.cpp:
        fix test prg
      3ad18a30
    • unknown's avatar
      Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb · 977d6c76
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
      
      
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp:
        Auto merged
      977d6c76
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint · f66b2278
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
      
      f66b2278
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1-maint · 4fd148b4
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
      
      
      storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
        Auto merged
      4fd148b4
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1 · 400337ad
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb
      
      400337ad
    • unknown's avatar
      Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0 · 7f274b5b
      unknown authored
      into  whalegate.ndb.mysql.com:/home/tomas/mysql-5.0-ndb
      
      7f274b5b
    • unknown's avatar
      Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/50 · b2af7b90
      unknown authored
      into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
      
      b2af7b90
    • unknown's avatar
      Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1 · cd7f48b7
      unknown authored
      into  quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/51
      
      
      include/my_global.h:
        Auto merged
      mysql-test/mysql-test-run.pl:
        Auto merged
      mysql-test/r/help.result:
        Auto merged
      mysql-test/t/help.test:
        Auto merged
      sql/mysql_priv.h:
        Auto merged
      sql/sql_class.cc:
        Auto merged
      sql/sql_yacc.yy:
        Auto merged
      cd7f48b7
  2. 21 Mar, 2007 13 commits